DotnetPrograming

Dotnet Programing : Dotnet Interview Questions,CrystalReports-Datagrid-DotnetRemoting-DropDownList-LINQ-ListView-N-Tier Architecture-Serialization-smartClinetApplications-UserControls-ValidationControls-WebServices.

Archive for the ‘EMail’ Category

How to Send to BCC Recipients

Posted by dotnetprograming on June 26, 2009

‘ Create a mailman object for sending email.
Dim mailman As New Chilkat.MailMan()

‘ Any string passed to UnlockComponent automatically begins a 30-day trial.
Dim success As Boolean
success = mailman.UnlockComponent(“Hello World”)
If (success true) Then
MsgBox(mailman.LastErrorText)
Exit Sub
End If

‘ Set the SMTP server.
mailman.SmtpHost = “smtp.earthlink.net”

‘ Create an email with multiple BCC recipients.
Dim email As New Chilkat.Email()

‘ Set the basic email stuff: body, subject, “from”, “to”
email.Body = “This is the email body”
email.Subject = “This is the email subject”
email.AddTo(“Chilkat Support”, “support@chilkatsoft.com”)
email.From = “Programmer “

‘ To add multiple BCC recipients, you can call AddBcc multiple times
‘ and/or call AddMultipleBcc with a comma-separated list of email addresses.
‘ Either method can be called any number of times. Chilkat automatically
‘ removes duplicates.
email.AddBcc(“”, “sales@chilkatsoft.com”)
email.AddBcc(“Chilkat HR”, “hr@chilkatsof.com”)
email.AddMultipleBcc(“Jack Frost , matt@chilkatsoft.com, Bob “)

success = mailman.SendEmail(email)
If success Then
MessageBox.Show(“Sent BCC email!”)
Else
MessageBox.Show(mailman.LastErrorText)

End If

Posted in EMail | Leave a Comment »

How to Send CC Email

Posted by dotnetprograming on June 26, 2009

‘ Create a mailman object for sending email.
Dim mailman As New Chilkat.MailMan()

‘ Any string passed to UnlockComponent automatically begins a 30-day trial.
Dim success As Boolean
success = mailman.UnlockComponent(“Hello World”)
If (success true) Then
MsgBox(mailman.LastErrorText)
Exit Sub
End If

‘ Set the SMTP server.
mailman.SmtpHost = “smtp.earthlink.net”

‘ Create an email with multiple CC recipients.
Dim email As New Chilkat.Email()

‘ Set the basic email stuff: body, subject, “from”, “to”
email.Body = “This is the email body”
email.Subject = “This is the email subject”
email.AddTo(“Chilkat Support”, “support@chilkatsoft.com”)
email.From = “Programmer “

‘ To add multiple CC recipients, you can call AddCC multiple times
‘ and/or call AddMultipleCC with a comma-separated list of email addresses.
‘ Either method can be called any number of times. Chilkat automatically
‘ removes duplicates.
email.AddCC(“”, “sales@chilkatsoft.com”)
email.AddCC(“Chilkat HR”, “hr@chilkatsof.com”)
email.AddMultipleCC(“Jack Frost , matt@chilkatsoft.com, Bob “)

‘ If you are curious, look at the full MIME text of the email…
MessageBox.Show(email.GetMime())

success = mailman.SendEmail(email)
If success Then
MessageBox.Show(“Sent email!”)
Else
MessageBox.Show(mailman.LastErrorText)

End If

Posted in EMail | Leave a Comment »

How to Send Multiple File Attachment Email

Posted by dotnetprograming on June 26, 2009

‘ Create a mailman object for sending email.
Dim mailman As New Chilkat.MailMan()

‘ Any string passed to UnlockComponent automatically begins a 30-day trial.
Dim success As Boolean
success = mailman.UnlockComponent(“Hello World”)
If (success true) Then
MsgBox(mailman.LastErrorText)
Exit Sub
End If

‘ Set the SMTP server host.
mailman.SmtpHost = “smtp.earthlink.net”

‘ Create a simple email with file attachments.
Dim email As New Chilkat.Email()

‘ This email will have both a plain-text body and an HTML body.
email.Body = “This is the plain-text alternative”
email.AddHtmlAlternativeBody(“This is bold red text.“)
email.Subject = “This email has several file attachments.”
email.AddTo(“Chilkat Support”, “support@chilkatsoft.com”)
email.From = “Hello World “

‘ Add a file attachment.
Dim contentType As String
‘ Returns the content-type of the attachment (determined by the file extension)
‘ This return value is for informational purposes only.
contentType = email.AddFileAttachment(“dude.gif”)
If contentType Is Nothing Then
MessageBox.Show(email.LastErrorText)
Return
End If

‘ To add more attachments, simply call AddFileAttachment for each file to be added.
contentType = email.AddFileAttachment(“dude2.gif”)
If contentType Is Nothing Then
MessageBox.Show(email.LastErrorText)
Return
End If

‘ Send email.
success = mailman.SendEmail(email)
If success Then
MessageBox.Show(“Sent email with attachments!”)
Else
MessageBox.Show(mailman.LastErrorText)
End If

Posted in EMail | Leave a Comment »

How to Send HTML Email

Posted by dotnetprograming on June 26, 2009

‘ Create a mailman object for sending email.
Dim mailman As New Chilkat.MailMan()

‘ Any string passed to UnlockComponent automatically begins a 30-day trial.
Dim success As Boolean
success = mailman.UnlockComponent(“Hello World”)
If (success true) Then
MsgBox(mailman.LastErrorText)
Exit Sub
End If

‘ Set the SMTP server hostname.
mailman.SmtpHost = “smtp.earthlink.net”

‘ Create a simple HTML mail.
Dim email As New Chilkat.Email()

email.SetHtmlBody(“This is red bold text“)
email.Subject = “This is a simple HTML email”
email.AddTo(“Chilkat Support”, “support@chilkatsoft.com”)
email.From = “Jack Johnson “

‘ Send HTML mail.
success = mailman.SendEmail(email)
If success Then
MessageBox.Show(“Sent mail!”)
Else
MessageBox.Show(mailman.LastErrorText)
End If

Posted in EMail | Leave a Comment »