|
 |
asp_cdo thread: Problems Regarding sending mails with HTML Content and having attachments using JMail.
Message #1 by "Venkata Kishore" <ivkishore@p...> on Fri, 16 Nov 2001 05:41:17
|
|
Hai,
I need to send an email message consisting of some HTML content ( May be
1 or 2 images ) , some plain text and also consisting of an attachment
with it. My problem is that i receive an error message which says
" All Servers have failed to Receive your message." while sending this
mail. The component i use is JMail component.
Please do provide me a solution regarding this problem. Jot down the
basic settings that have to be given before i proceed further,... by which
i mean settings like,
JMail.ISOEncodeHeaders = false
JMail.ContentTransferEncoding = "8bit" etc.
A simple mail with some plain text results in no error , but a mail
with HTML content and also sending an attachment along with it produces an
error as mentioned above.
I kindly request you to provide me a detailed solution for which act i
would be very thankful to you.
Regards,
Kishore.
Message #2 by =?iso-8859-1?q?sheeraz=20rashid?= <sheeraz11@y...> on Fri, 16 Nov 2001 05:51:44 +0000 (GMT)
|
|
Did you use that before your "Jmail.Body"?
if not then use that. It will not give you any error.
JMail.ContentType = "text/html"
=====
have a good time.
with best wishes.
from
SHEERAZ.
Message #3 by mehdi nikkhah <ma_nikkhah@y...> on Sat, 17 Nov 2001 22:12:23 -0800 (PST)
|
|
--------------
hi dear friend
if you use JMail object you can send your emails in
HTML-format. When doing that you can also have images
inside your email and not just attach them.
for example
HTMLjmail
<%@LANGUAGE="VBSCRIPT" %>
<HTML>
<BODY>
<%
Set jmail = Server.CreateObject("JMail.Message")
jmail.AddRecipient "myRecipient@h...",
"Mr.Example"
jmail.From = "me@m..."
jmail.Subject = "Here's some graphics!"
jmail.Body = "A nice picture if you can read
HTML-mail."
' The return value of AddAttachment is used as a
' reference to the image in the HTMLBody.
contentId
jmail.AddAttachment("c:\myCoolPicture.gif")
' As only HTML formatted emails can contain inline
images
' we use HTMLBody and appendHTML
jmail.HTMLBody = "<html><body><font color=""red"">Hi,
here is a nice picture:</font><br>"
jmail.appendHTML "<img src=""cid:" & contentId & """>"
jmail.appendHTML "<br><br>good one huh?</body></html>"
' But as not all mailreaders are capable of showing
HTML emails
' we will also add a standard text body
jmail.Body = "Too bad you can't read HTML-mail."
jmail.appendText " There would have been a nice
picture for you"
jmail.Send( "mailserver.mydomain.com" )
%>
Email sent! </BODY>
</HTML>
-------------------------------------------------------
--- Venkata Kishore <ivkishore@p...>
wrote:
> Hai,
> I need to send an email message consisting of some
> HTML content ( May be
> 1 or 2 images ) , some plain text and also
> consisting of an attachment
> with it. My problem is that i receive an error
> message which says
>
> " All Servers have failed to Receive your
> message." while sending this
> mail. The component i use is JMail component.
>
> Please do provide me a solution regarding this
> problem. Jot down the
> basic settings that have to be given before i
> proceed further,... by which
> i mean settings like,
>
> JMail.ISOEncodeHeaders = false
> JMail.ContentTransferEncoding = "8bit" etc.
>
> A simple mail with some plain text results in no
> error , but a mail
> with HTML content and also sending an attachment
> along with it produces an
> error as mentioned above.
>
> I kindly request you to provide me a detailed
> solution for which act i
> would be very thankful to you.
>
>
> Regards,
>
> Kishore.
>
>
>
> ma_nikkhah@y...
> $subst('Email.Unsub')
>
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
|
|
 |