IT Advice and Code Snippets

    Paul Gough

 
home
 


Send an email to a mobile phone

Here is the code to send an email to a mobile phone. In this example you can send an email to me. It uses meteor’s multimedia messaging service.

Imports System.Net.Mail

    Dim mail As MailMessage = New MailMessage()
        mail.To.Add("0857344476@mms.mymeteor.ie")
        mail.From = New MailAddress("Your Email Address")
        mail.Subject = "www.GoughIt.com"
        mail.Body = Message.Text
        mail.IsBodyHtml = False
        Dim smtp As SmtpClient = New SmtpClient()
        smtp.Host = "smtp.youremailserver.com" 'Your SMTP Server Address
        smtp.Credentials = New System.Net.NetworkCredential("Your Email Address", "Password")
        Try
            smtp.Send(mail)
            Label1.Text = "Message sent"
        Catch ex As Exception
            Label1.Text = ex.Message '"Message NOT sent"
        End Try



A Simple Blog engine developed with .NET

Get IP and counrtry of your webpage visitors

Google maps Geocoder sample in vb aspx .net

Send an email to a mobile phone

Comments

Name