CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 email to remote SMTP

Print topic Send  topic

Author Message

Posts: 20
Posted: 10/09/2008, 7:54 AM

I am using a remote SMTP server that required a login to use, and experienced a Relay error, which this code solved:

'Record DISPATCH Event AfterInsert. Action Custom Code @34-73254650
' -------------------------
If ExecuteFlag And (Not ErrorFlag) Then
Dim userEmail, assignedUserEmail, taskId As String

userEmail = ""

assignedUserEmail = Convert.ToString(Settings.Connection1DataAccessObject.ExecuteScalar( _
"SELECT TextEmail FROM Staff WHERE Initials='" & Convert.ToString(item.Staffid.Value)& "'"))

Dim newMessage As New System.Web.Mail.MailMessage()

newMessage.From = userEmail
newMessage.To = assignedUserEmail
newMessage.Subject = "New Dispatch!"
newMessage.Body = "Get dispatch ASAP please."
newMessage.Fields.Item("") = 2
newMessage.Fields.Item("") = """"
newMessage.Fields.Item("") = "wlciii"
newMessage.Fields.Item("") = 1

System.Web.Mail.SmtpMail.SmtpServer = ""
End If
' -------------------------
'End Record DISPATCH Event AfterInsert. Action Custom Code
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.