Results 1 to 11 of 11

Thread: Sending an email though VB.NET

  1. #1

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57

    Sending an email though VB.NET

    How can I send an email though VB.NET?
    I'm looking at System.Web.Mail right now but I can't figure anything out.
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    well..i got this to work
    VB Code:
    1. Imports System.Web.Mail
    2. .
    3. .
    4. .
    5.  
    6.  
    7.  Dim newmsg As New MailMessage
    8.  newmsg.To = "[email protected]"
    9.  newmsg.From = "[email protected]"
    10.  newmsg.Body = "testing123"
    11. ' i started to use the lines above..then found the line below...should work all on its own
    12.  System.Web.Mail.SmtpMail.Send(newmsg.From, newmsg.To, "subject", newmsg.Body)

    but I think you can just use the system.web.mail.smtpmail.send

    you might need to do something with:
    system.Web.Mail.SmtpMail.SmtpServer
    to set the mail server..i didnt need to but...
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57
    That's how I tried doing it at first but it just freezes.
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by JesusFreak
    That's how I tried doing it at first but it just freezes.
    Try to catch any expected error !! I was trying to send email from my machine but with no luck .I had to use free smtp server !

  5. #5
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    are you behind a firewall? or anything odd?

    Antivirus software?

    strange...it worked fine for me.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  6. #6

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57
    I have Norton Internet Security(Includes Antivirus and Firewall).
    Were can I get a free smpt sever?
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    try another way of sending emails
    Sending Mail in VB.NET using Sockets

  8. #8
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Smile

    There is also a SMTP available inside Win2K. When you install IIS you can check on the SMTP option.
    ~Peter


  9. #9
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I need one for XP ?? Is it dll or whatever it is ??

  10. #10
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Question

    You need to know where it is? It's packaged with the OS.

    Open the Control Panel, Add/Remove Programs, Add/Remove Windows Components, Internet Information Services (IIS), Details button, and check on SMTP Service.
    ~Peter


  11. #11

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57
    Originally posted by Pirate
    try another way of sending emails
    Sending Mail in VB.NET using Sockets
    Code:
    Dim m As New SocketMail("what do I put here?", 25)
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

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