By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

HTML MailMessage issue

P: n/a
tma
It appears that even though my mailmessage.bodyformat is set to
mailformat.html, my html is being stripped out of the .body string in the
code below. Anyone have any thoughts on why this happens?

..From = "tommy@***.net"

..To = oApplicant.Email

..Bcc = ""

..Subject = "Registration Application"

..Body = EmailBody()

..BodyFormat = MailFormat.Html

SmtpMail.SmtpServer = "127.0.0.1"

SmtpMail.Send(mailMsg)

Just in case, this is the body text:

EmailBody = "<html><head><title>Registration
Confirmation</title></head><body><p>Thank you for registering with the ***.
Attached to this email are several important documents:<br><br> 1. <b>A copy
of your registration application </b> - Print this document and bring it to
you to the closest registration site. <b>You are not officially registered
until payment is made in full before the close of the registration period.
</b> Also included with your application are your registration agreements.
Please read them carefully.<br><br>2. <b>Parent's Guide</b> - This helpful
guide includes important dates, park rules and league rules with which you
should be familiar. If you have any questions, they are probably answered
here. <br><br>If you have registered for football and elected to rent
equipment from ***, you will need to pick up your equipment at the Please
do not forget to bring your child!<br><br>Thank you and we look forward to a
very exciting season at ***. </p><p></p></body></html>"


Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Don't know if this is the issue for sure, but try setting the BodyFormat
property before the Body property.

"tma" <tm*@allisconfusing.net> wrote in message
news:uo*************@tk2msftngp13.phx.gbl...
It appears that even though my mailmessage.bodyformat is set to
mailformat.html, my html is being stripped out of the .body string in the
code below. Anyone have any thoughts on why this happens?

.From = "tommy@***.net"

.To = oApplicant.Email

.Bcc = ""

.Subject = "Registration Application"

.Body = EmailBody()

.BodyFormat = MailFormat.Html

SmtpMail.SmtpServer = "127.0.0.1"

SmtpMail.Send(mailMsg)

Just in case, this is the body text:

EmailBody = "<html><head><title>Registration
Confirmation</title></head><body><p>Thank you for registering with the ***. Attached to this email are several important documents:<br><br> 1. <b>A copy of your registration application </b> - Print this document and bring it to you to the closest registration site. <b>You are not officially registered
until payment is made in full before the close of the registration period.
</b> Also included with your application are your registration agreements.
Please read them carefully.<br><br>2. <b>Parent's Guide</b> - This helpful
guide includes important dates, park rules and league rules with which you
should be familiar. If you have any questions, they are probably answered
here. <br><br>If you have registered for football and elected to rent
equipment from ***, you will need to pick up your equipment at the Please
do not forget to bring your child!<br><br>Thank you and we look forward to a very exciting season at ***. </p><p></p></body></html>"

Nov 20 '05 #2

P: n/a
tma
I've actually tried it both ways.

"Marina" <so*****@nospam.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
Don't know if this is the issue for sure, but try setting the BodyFormat
property before the Body property.

"tma" <tm*@allisconfusing.net> wrote in message
news:uo*************@tk2msftngp13.phx.gbl...
It appears that even though my mailmessage.bodyformat is set to
mailformat.html, my html is being stripped out of the .body string in the code below. Anyone have any thoughts on why this happens?

.From = "tommy@***.net"

.To = oApplicant.Email

.Bcc = ""

.Subject = "Registration Application"

.Body = EmailBody()

.BodyFormat = MailFormat.Html

SmtpMail.SmtpServer = "127.0.0.1"

SmtpMail.Send(mailMsg)

Just in case, this is the body text:

EmailBody = "<html><head><title>Registration
Confirmation</title></head><body><p>Thank you for registering with the ***.
Attached to this email are several important documents:<br><br> 1. <b>A

copy
of your registration application </b> - Print this document and bring it

to
you to the closest registration site. <b>You are not officially registered until payment is made in full before the close of the registration period. </b> Also included with your application are your registration agreements. Please read them carefully.<br><br>2. <b>Parent's Guide</b> - This helpful guide includes important dates, park rules and league rules with which you should be familiar. If you have any questions, they are probably answered here. <br><br>If you have registered for football and elected to rent
equipment from ***, you will need to pick up your equipment at the Please do not forget to bring your child!<br><br>Thank you and we look forward

to a
very exciting season at ***. </p><p></p></body></html>"


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.