在我使用邮件时,能否确定电子邮件的主题/内容?
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
在我使用邮件时,能否确定电子邮件的主题/内容?
是的,用邮寄方式看看所有透镜:。
邮址:
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate">example</a>
2. 带有内容的邮件:
<a href="mailto:no-one@snai1mai1.com?subject=look at this website&body=Hi,I found this website and thought you might like it http://www.geocities.com/wowhtml/">tell a friend</a>
如评论意见所述,必须适当逃脱<条码>、<>条码>和<条码>。 使用<代码>统一编码(目标)代码>,而不是具体案例的手编码。
https://stackoverflow.com/users/892018/hoody” 在评论中,你可以添加行距,在座标上添加以下编码顺序:
%0D%0A // one line break
<a href="mailto:manish@simplygraphix.com?subject=Feedback for
webdevelopersnotes.com&body=The Tips and Tricks section is great
&cc=anotheremailaddress@anotherdomain.com
&bcc=onemore@anotherdomain.com">Send me an email</a>
您可使用该守则确定主题、机构、职业、职业或职业。
www.un.org/Depts/DGACM/index_french.htm https://www.rfc-editor.org/rfc/rfc2368“rel=“nofollow noreferer”>。 此外,将信息输入URLs和URIs的公约在RFC 1738 RFC 39 <86/a>。 这些条文规定如何列入<条码> 。 • 加入《欧洲刑法》:
mailto:infobot@example.com?subject=current-issue&body=send%20current-issue
具体来说,你必须把电子邮件地址、主题和机构编码成百上千条,并采用上述格式。 Percent-encoded text is legal for use in HTML,然而,根据的实体。 罗马尼亚
<a href="mailto:infobot@example.com?subject=current-issue&body=send%20current-issue">Send email</a>
一般来说,这里是一种简单的带上上述编码的硬拷贝。
<?php
$encodedTo = rawurlencode($message->to);
$encodedSubject = rawurlencode($message->subject);
$encodedBody = rawurlencode($message->body);
$uri = "mailto:$encodedTo?subject=$encodedSubject&body=$encodedBody";
$encodedUri = htmlspecialchars($uri);
echo "<a href="$encodedUri">Send email</a>";
?>
You can add subject added to the mailto command using either one of the following ways. Add ?subject out mailto to the mailto tag.
<a href="mailto:test@example.com?subject=testing out mailto">First Example</a>
我们还可以通过添加和复制,将案文添加到电文的正文中;如以下例子所示,在信标的末端。
<a href="mailto:test@example.com?subject=testing out mailto&body=Just testing">Second Example</a>
除体外,用户还可进行类型和取样;或/或和;b 能够填充CC和BCC的田地。
<a href="mailto:test@example.com?subject=testing out mailto&body=Just testing&cc=test1@example.com&bcc=test1@example.com">Third
Example</a>
mailto:joe@company.com?subject=Your+subject
我将其分成两条线,使其更加可读。
<a href="
mailto:johndoe@gmail.com
?subject=My+great+email+to+you
&body=This+is+an+awesome+email
&cc=janedoe@gmail.com
&bcc=billybob@yahoo.com
">Click here to send email!</a>
here is the trick http://neworganizing.com/content/blog/tip-prepopulate-mailto-links-with-subject-body-text
<a href="mailto:tips@neworganizing.com?subject=Your+tip+on+mailto+links&body=Thanks+for+this+tip">tell a friend</a>
是的。
mailto: email@host.com?subject=something
http://www.ietf.org/rfc/rfc2368.txt“rel=“noreferer”RFC 2368 :
特殊名称“人”表示,相关的标签价值是电文的体。 “人”名称应当包含该信息的第一稿/解释部分的内容。 邮电网主要是为了生成实际上属于自动处理内容的短文信息(如邮寄名单的“订阅”信息),而不是一般的监评机构。
这里是一个可操作的幻灯塔,帮助你生成邮件:与任择主题和机构的联系。
function generate() {
var email = $( #email ).val();
var subject = $( #subject ).val();
var body = $( #body ).val();
var mailto = mailto: + email;
var params = {};
if (subject) {
params.subject = subject;
}
if (body) {
params.body = body;
}
if (params) {
mailto += ? + $.param(params);
}
var $output = $( #output );
$output.val(mailto);
$output.focus();
$output.select();
document.execCommand( copy );
}
$(document).ready(function() {
$( #generate ).on( click , generate);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" id="email" placeholder="email address" /><br/>
<input type="text" id="subject" placeholder="Subject" /><br/>
<textarea id="body" placeholder="Body"></textarea><br/>
<button type="button" id="generate">Generate & copy to clipboard</button><br/>
<textarea id="output">Output</textarea>
如果您想在电子邮件中添加html的内容,则发送传真机的“url encode their html”代码,并将其列入您的邮件链接代码,但问题在于,你可以将这种链接的电子邮件类型从平原文本上排到html,用户使用这一链接,需要其邮件客户在缺席时发出html电子邮件。 如果你想在这里测试的是简便邮件链接的代码,其图像在链接中总结(为可见度而添加的单体风格镜):
<a href="mailto:?body=%3Ca%20href%3D%22{{ scope.url }}%22%3E%3Cimg%20src%3D%22{{ scope.url }}%22%20width%3D%22300%22%20%2F%3E%3C%2Fa%3E">
The html tags are url encoded.
你只是需要一份简单的超文本文件。
<a href="mailto:email@example.com?subject=This is a subject&body=This is body">Send an email</a>
供邮件使用的动态链接比以下代码:
const formConsultation = document.querySelector( form#form-consultation );
formConsultation.addEventListener("submit", function(evt) {
evt.preventDefault();
var targetobj = evt.target;
var actionUrl = targetobj.action;
var message = targetobj.message.value;
if (actionUrl && actionUrl != "#" && message) {
var newBodyMsg = subject = "";
var username = targetobj.username.value;
var useremail = targetobj.useremail.value;
if (targetobj.subject.value && targetobj.subject.value.trim().length > 0) {
subject = targetobj.subject.value;
}
if (username.trim().length > 0) {
newBodyMsg += "Hi! my name is " + username + ".";
}
if (useremail.trim().length > 0) {
if (newBodyMsg.length > 0) {
newBodyMsg += " & ";
}
newBodyMsg += "my email address is " + useremail + ".";
}
if (newBodyMsg.length > 0) {
newBodyMsg += "
";
}
newBodyMsg += message;
window.open(actionUrl + "?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(newBodyMsg));
}
});
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<body>
<div class="container">
<form action="mailto:example@test.com" method="get" enctype="text/plain" class="form-consultation" id="form-consultation">
<div class="mb-3">
<label class="form-label">Name</label>
<input type="text" class="form-control" name="username" placeholder="Your Name" required>
</div>
<div class="mb-3">
<label class="form-label">Email</label>
<input type="email" class="form-control" name="useremail" placeholder="Your Email address" required>
</div>
<div class="mb-3">
<label class="form-label">Subject</label>
<input type="text" class="form-control" name="subject" placeholder="Subject" required>
</div>
<div class="mb-3">
<label class="form-label">Message</label>
<textarea cols="30" rows="3" class="form-control" name="message" placeholder="Message" required></textarea>
</div>
<button type="submit" class="btn btn-primary">Send A Message</button>
</form>
</div>
</body>
OR Using Jquery
$( #form-consultation ).submit(function() {
event.preventDefault(); // this will prevent the default submit
var actionUrl = $(this).attr( action );
var message = $(this).find("textarea[name=message]");
if(actionUrl && actionUrl != "#" && message) {
var newBodyMsg = subject = "";
var username = $(this).find("input[name=username]").val();
var useremail = $(this).find("input[name=useremail]").val();
if(username.trim().length > 0) {
newBodyMsg += "Hi! my name is " + username + ".";
}
if(useremail.trim().length > 0) {
if(newBodyMsg.length > 0) {
newBodyMsg += " & ";
}
newBodyMsg += "my email address is " + useremail + ".";
}
if (newBodyMsg.length > 0) {
newBodyMsg += "
";
}
newBodyMsg += message.val();
window.open(actionUrl + "?subject="+ encodeURIComponent(subject) +"&body=" + encodeURIComponent(newBodyMsg));
}
return false;
});
<>0>NOTE:在您的系统中高于代码。 如果你试图在座标上行码(头盔),那就比起工作。 流入。 因此,请在你的地方系统中测试这一守则。
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...
<form><input type="file" name="first" onchange="jsFunction(2);"> <input type="file" name="second" onchange="jsFunction(3);"</form> Possible to pass just numbers to the js ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!