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>" 2 1136
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>"
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>"
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: marc gold |
last post by:
I am trying to create a send html functionality in a windows UI
application. And using c# (of course) and the System.Web.Mail objects
some sites work (aka www.microsoft.com) and some sites do not...
|
by: Michael |
last post by:
Hello,
I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line...
|
by: Aren Cambre |
last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's
BodyFormat = MailFormat.Html? I've searched all over the place and
cannot find a solution anywhere. I am running this on Windows XP...
|
by: Jim in Arizona |
last post by:
Now that I've figured out how to send mail within our domain:
Dim test as new System.Net.Mail.SmtpClient
Dim nco as New
System.Net.NetworkCredential("mailaccount","password","domain")...
|
by: ChrisA |
last post by:
I'm sending email from my ASP.NET 1.1 app, and it works fine providing the
BodyFormat of the System.Web.Mail.MailMessage is set to Text.
If I change to Html format, it breaks. Here's the code:
...
|
by: Stu Lock |
last post by:
Hi,
I have an app that has beenusing the JMail COM component to generate emails.
I would like to switch to the using the .Net 2.0 MailMessage object
instead - as it is more portable.
The...
|
by: Ray Booysen |
last post by:
Hi all
I'm sending email via ASP.NET in HTML mode. Each email has exactly one
attachment and I do have full access to the SMTP server. However, if I
send the email in HTML format, the...
|
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= |
last post by:
I wrote some code to send an email with two alternate views:
1) html
2) plain text
All the html enabled email clients accept the html just fine and disregard
the plain text version.
However,...
|
by: anu b |
last post by:
Now i am sending email to my friend using session variable...
but my code is as below
private bool SendEmail(string email)
{
try
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |