raw_Content Property


This property specifies raw content for email.

Data Type: String

Remarks

By default, EASendMail generates email content based on From, Recipients, Attachment, BodyText property automatically and send the content to SMTP server. However, if you want to use a special email content which cannot be generated by EASendMail, then you can use this property.

Example

[Visual Basic]
Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail

  oSmtp.LicenseCode = "TryIt"  
  oSmtp.ServerAddr = "mail.adminsystem.com"
  
  ' Set user authentication 
  oSmtp.UserName = "test@adminsystem.com"
  oSmtp.Password = "test"
  
  'If your server requires SSL connection 
  'oSmtp.SSL_init 
  'oSmtp.SSL_starttls = 0 
  'oSmtp.ServerPort = 465
  
  ''If your server requires TLS connection 
  'oSmtp.SSL_init 
  'oSmtp.SSL_starttls = 1 
  'oSmtp.ServerPort = 25
  
  oSmtp.FromAddr = "test@emailarchitect.net"
  oSmtp.AddRecipient "Support Team", "support@emailarchitect.net", 0

  Dim content
  content = "Message-ID: <6df24faceb69c51460c17fa0001bee3f@>" & Chr(13) & Chr(10)
  content = content & "From: <>" & Chr(13) & Chr(10)
  content = content &  "Subject: test email with customized content" & Chr(13) & Chr(10)
  content = content & "Date: Tue, 07 Feb 2012 16:10:50 +0800" & Chr(13) & Chr(10)
  content = content & "MIME-Version: 1.0" & Chr(13) & Chr(10)
  content = content & "Content-Type: text/xml" & Chr(13) & Chr(10)
  content = content &  Chr(13) & Chr(10)
  content = content & "customized body text....." & Chr(13) & Chr(10)

  oSmtp.raw_Content = content
  
  If oSmtp.SendMail() = 0 Then
    MsgBox "Message delivered!"
  Else
    MsgBox oSmtp.GetLastErrDescription()
  End If
End Sub

See Also

BodyFormat Property
Charset Property
ImportMail Method
ConvertHTML Method