xxsoftwarexx Posted January 4, 2009 Report Posted January 4, 2009 Public Shared Sub SendMessage(ByVal subject As String, ByVal messageBody As String, _ ByVal fromAddress As String, ByVal toAddress As String, ByVal ccAddress As String) Dim message As New MailMessage() Dim client As New SmtpClient() 'Set the sender's address message.From = New MailAddress(fromAddress) 'Allow multiple "To" addresses to be separated by a semi-colon If (toAddress.Trim.Length > 0) Then For Each addr As String In toAddress.Split(";"c) message.To.Add(New MailAddress(addr)) Next End If 'Allow multiple "Cc" addresses to be separated by a semi-colon If (ccAddress.Trim.Length > 0) Then For Each addr As String In ccAddress.Split(";"c) message.CC.Add(New MailAddress(addr)) Next End If 'Set the subject and message body text message.Subject = subject message.Body = messageBody 'TODO: *** Modify for your SMTP server *** 'Set the SMTP server to be used to send the message client.Host = "Host" 'Your SMTP Server goes here client.Credentials = New System.Net.NetworkCredential( User, Pass) 'login info for the SMTP 'client.Port = "" 'if needed remove the ' from before it client.EnableSsl = False 'SSl for SMTP 'Send the e-mail message client.Send(message) End Sub
yungbol Posted January 5, 2009 Report Posted January 5, 2009 Um, to anyone who doesn't know, this is for Visual Basic.NET. Next time tell what it is for.
sillybob123 Posted January 12, 2009 Report Posted January 12, 2009 You didnt write this ? :S lol + you need to spell the title right
Mcmodder♥ Posted January 12, 2009 Report Posted January 12, 2009 You didnt write this ? :S lol + you need to spell the title rightlol yh he cant spell send haha
Korupt Data Posted January 13, 2009 Report Posted January 13, 2009 lol yh he cant spell send hahaumm stop with the flaming, every post you have made lately has been flaming a member in some way... and btw you cant spell "yeah" right >.>
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now