Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Using SendMime to Specify a SMTP FROM Different than the FROM MIME Header Field
Demonstrates how to call SendMime so that the FROM address in the MIME header may be different than the FROM address passed to the SMTP server during the SMTP protocol conversation. Dim mailman As New ChilkatMailMan2 mailman.UnlockComponent "test" mailman.SmtpHost = "smtp.comcast.net" Dim email As New ChilkatEmail2 email.Subject = "test email from Chilkat" email.Body = "this is a test for our customer" email.AddTo "Matt Fausey", "admin@chilkatsoft.com" email.AddFileAttachment "fw9.pdf" ' If we send the email by calling mailman.SendEmail, this is ' the FROM address that is in the MIME header of the email, ' as well as the FROM address passed to the SMTP server ' as part of the SMTP protocol. email.FromName = "Chilkat Support" email.FromAddress = "support@chilkatsoft.com" ' In this example, we'll send the email by calling mailman.SendMime ' This allows us to provide recipients and a "From" address that may ' be different than what is in the MIME header of the email. Dim mime As String mime = email.GetMime() Dim recipientList As String Dim smtpFrom As String smtpFrom = "joe@mycompany.com" recipientList = "admin@chilkatsoft.com, support@chilkatsoft.com" success = mailman.SendMime(smtpFrom, recipientList, mime) If (success = 0) Then MsgBox mailman.LastErrorText End If
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.