P Phin Jun 1, 2005 #2 Robert, Add the following to your function or method (define fields like strSendFromName): Dim mail As New System.Web.Mail.MailMessage Dim SmtpMail As System.Web.Mail.SmtpMail mail.From = "\" & strSendFromName & "\ <" & strSendFromEmail & ">" mail.To = "\" & strSendToName & "\ <" & strSendToEmail & ">" If strCC_ToEmail.Trim <> "" Then mail.Cc = "\" & strCC_ToName & "\ <" & strCC_ToEmail & ">" End If mail.Bcc = "(e-mail address removed)" mail.Subject = strSubject mail.Body = strMessage mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "SendEmailUser") 'set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "z&me2ruV") 'set your password here SmtpMail.SmtpServer = strHost SmtpMail.Send(mail) Good luck, Phin
Robert, Add the following to your function or method (define fields like strSendFromName): Dim mail As New System.Web.Mail.MailMessage Dim SmtpMail As System.Web.Mail.SmtpMail mail.From = "\" & strSendFromName & "\ <" & strSendFromEmail & ">" mail.To = "\" & strSendToName & "\ <" & strSendToEmail & ">" If strCC_ToEmail.Trim <> "" Then mail.Cc = "\" & strCC_ToName & "\ <" & strCC_ToEmail & ">" End If mail.Bcc = "(e-mail address removed)" mail.Subject = strSubject mail.Body = strMessage mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "SendEmailUser") 'set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "z&me2ruV") 'set your password here SmtpMail.SmtpServer = strHost SmtpMail.Send(mail) Good luck, Phin
P Phin Jun 1, 2005 #3 Robert, Add the following to your function or method (define fields like strSendFromName and give it a value): Dim mail As New System.Web.Mail.MailMessage Dim SmtpMail As System.Web.Mail.SmtpMail mail.From = "\" & strSendFromName & "\ <" & strSendFromEmail & ">" mail.To = "\" & strSendToName & "\ <" & strSendToEmail & ">" If strCC_ToEmail.Trim <> "" Then mail.Cc = "\" & strCC_ToName & "\ <" & strCC_ToEmail & ">" End If mail.Bcc = "(e-mail address removed)" mail.Subject = strSubject mail.Body = strMessage mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "YOUR_EMAILUSER") 'set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "YOUR_PASSWORD") 'set your password here SmtpMail.SmtpServer = strHost SmtpMail.Send(mail) Good luck, Phin
Robert, Add the following to your function or method (define fields like strSendFromName and give it a value): Dim mail As New System.Web.Mail.MailMessage Dim SmtpMail As System.Web.Mail.SmtpMail mail.From = "\" & strSendFromName & "\ <" & strSendFromEmail & ">" mail.To = "\" & strSendToName & "\ <" & strSendToEmail & ">" If strCC_ToEmail.Trim <> "" Then mail.Cc = "\" & strCC_ToName & "\ <" & strCC_ToEmail & ">" End If mail.Bcc = "(e-mail address removed)" mail.Subject = strSubject mail.Body = strMessage mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "YOUR_EMAILUSER") 'set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "YOUR_PASSWORD") 'set your password here SmtpMail.SmtpServer = strHost SmtpMail.Send(mail) Good luck, Phin