HTML tag in Email Content

Discussion in 'ASP .Net' started by =?Utf-8?B?d3J5dGF0?=, May 5, 2005.

  1. I know to send e-mail, I can do the following:
    Dim newMail As New MailMessage
    newMail.From = ""
    newMail.To = ""
    newMail.Subject = "The Subject"
    newMail.Body = "The Content"
    SmtpMail.Send(newMail)

    I tried to key in things like "<strong>Comment:</strong> No<br />
    <strong>Url:</strong> <a href='www.yahoo.com'>" in the content, but it didn't
    come out as what I expected. How to add html tag in the content of the email?
    =?Utf-8?B?d3J5dGF0?=, May 5, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?d3J5dGF0?=

    Dave Fancher Guest

    newMail.BodyFormat = MailFormat.Html

    --
    HTH
    ----------------
    Dave Fancher
    http://davefancher.blogspot.com

    "wrytat" <> wrote in message
    news:...
    >I know to send e-mail, I can do the following:
    > Dim newMail As New MailMessage
    > newMail.From = ""
    > newMail.To = ""
    > newMail.Subject = "The Subject"
    > newMail.Body = "The Content"
    > SmtpMail.Send(newMail)
    >
    > I tried to key in things like "<strong>Comment:</strong> No<br />
    > <strong>Url:</strong> <a href='www.yahoo.com'>" in the content, but it
    > didn't
    > come out as what I expected. How to add html tag in the content of the
    > email?
    Dave Fancher, May 5, 2005
    #2
    1. Advertising

  3. Thanks. I have another question, is there any reason for me always receiving
    the same e-mail twice when I only send (i.e. SmtpMail.Send(newMail)) once?

    "Dave Fancher" wrote:

    > newMail.BodyFormat = MailFormat.Html
    >
    > --
    > HTH
    > ----------------
    > Dave Fancher
    > http://davefancher.blogspot.com
    >
    > "wrytat" <> wrote in message
    > news:...
    > >I know to send e-mail, I can do the following:
    > > Dim newMail As New MailMessage
    > > newMail.From = ""
    > > newMail.To = ""
    > > newMail.Subject = "The Subject"
    > > newMail.Body = "The Content"
    > > SmtpMail.Send(newMail)
    > >
    > > I tried to key in things like "<strong>Comment:</strong> No<br />
    > > <strong>Url:</strong> <a href='www.yahoo.com'>" in the content, but it
    > > didn't
    > > come out as what I expected. How to add html tag in the content of the
    > > email?

    >
    >
    >
    =?Utf-8?B?d3J5dGF0?=, May 5, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    757
    John C. Bollinger
    Jan 27, 2006
  2. hazz
    Replies:
    6
    Views:
    49,424
    SkyUCHC
    Jun 9, 2010
  3. Replies:
    1
    Views:
    364
    Andrew Thompson
    Nov 29, 2006
  4. M Wells
    Replies:
    0
    Views:
    131
    M Wells
    Oct 6, 2004
  5. visu
    Replies:
    4
    Views:
    279
Loading...

Share This Page