Results 1 to 2 of 2

Thread: Mails with asp.net

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question Mails with asp.net

    Is it possible with asp.net to make automatically sent emails? I think it is called SMTP-mail or somthing like that. My server is Microsoft

  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    Sending mail couldn't be simpler in asp.net
    VB Code:
    1. Imports System.Web.Mail
    and then create a mail object and assign it's subject, text etc and send
    VB Code:
    1. Dim ObjMM As New MailMessage
    2.             ObjMM.From = "[email protected]"
    3.             ObjMM.To = "[email protected]"
    4.             ObjMM.Subject = "Auto Email"
    5.             ObjMM.Body = strMessage
    6.             ObjMM.BodyFormat = MailFormat.html
    7.             SmtpMail.Send(ObjMM)

    If you need to specify a different smtp server...
    VB Code:
    1. SmtpMail.SmtpServer = "smtp.xxx.co.uk"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width