Well, I'm almost there. Here's what I have so far...
Imports System.Web.Mail
Public Class Confirmation
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Generate a confirmation email and send it
Dim Message As New MailMessage
Message.To = "SomeEmail"
Message.Cc = "SomeCc"
Message.From = "
[email protected]" 'This is a registered user on the server
Message.Subject = "Some Subject"
Message.Body = "Body in HTML format"
Message.BodyFormat = Web.Mail.MailFormat.Html
SmtpMail.SmtpServer = "Mail server address"
'This is what I tried based on the links that Imar suggested
Message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1)
Message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "JobApp")
Message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "pwd")
SmtpMail.Send(Message)
The Error Message I keep getting is "The transport failed to connect to the server."
If I don't use the smtp authentication fields then it works fine, but it will only send to addresses within my domain (some kind of relaying thing I think).
Thanks!
Aaron