Author: webqueenhtc | Posted on: 11/18/2009 2:07:42 PM | Views : 359

See my code below.  Can i add "IF" statement in the .body of the mailMessage?  I want to send the field if and only if the field is not empty.  company/contact is not required; only email address is.
'send email
        Dim mailMessage2 As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
        mailMessage2.From = New System.Net.Mail.MailAddress(fEmailResult.Text.Trim())
        mailMessage2.To.Add(New System.Net.Mail.MailAddress(asp09@gmail.com))
        mailMessage2.Subject = "online request"
        mailMessage2.IsBodyHtml = True
        'body of message
        mailMessage2.Body =  ...

Go to the complete details ...