ASP send an HTML message to add a picture

Source: Internet
Author: User
Tags format
This wooden bird has tried before, but did not succeed, finally changed to HTTP connection picture, see you can succeed no, success remember to tell everyone

1 <HTML>
2
3 <body bgcolor=white>
4
5 <%
6
7 if request. ServerVariables ("request_method") = "Get" Then
8
9%>
10
One <form action= "htmlemail.asp" method=post>
<font face=verdana>
Your Name <input type= "text" name= "StrName" > Your EMail <input type= "text" name= "Stremail" >
<br>
Recipient Email <input type= "text" name= "Strto" >
<p>
17
<textarea cols=40 rows=4 Name=message>your message</textarea>
19
</p>
21st
<input Type=submit name=send value=send>
23
</form>
25
Num <%
27
Else
29
Set objmail = Server.CreateObject ("CDONTS. NewMail ")
Objmail.importance = 1
Objmail.from = Request ("StrName") & "<" & Request ("Stremail") & ">"
objmail.to = Request ("Strto")
Objmail.subject = "Example of HTML EMail with embeded Image"
35
' This is my messages HTML
Panax STRMSG = "" & _
""<a href=" "
Objmail.bodyformat = 0
Objmail.mailformat = 0
Objmail.body = STRMSG
48
Attach we image file and Set the URL to simply Http://www.webjx.com/htmldata/2005-05-05/http://www.webjx.com/htmldat A/2005-05-05/logo.gif
Objmail.attachurl server. MapPath ("Http://www.webjx.com/htmldata/2005-05-05/http://www.webjx.com/htmldata/2005-05-05/logo.gif"), "http:// Www.webjx.com/htmldata/2005-05-05/http://www.webjx.com/htmldata/2005-05-05/logo.gif "
Wuyi Objmail.send
52
Destroy the Email object
Set objmail = Nothing
55
%>
<font face=verdana>message Sent, thanks!</font>
60
<% End If%>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.