Results 1 to 3 of 3

Thread: need simple smtp example/code

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830

    need simple smtp example/code

    I am very interested in learning more on sending email via smtp. I have downloaded code from planetsourcecode that does work at work (has T1 line) but for some reason I can't get to work at home on a dialup. So could someone send me (or point in the right direction) some code/information on a very, very simple smtp example of sending an email?

    Thanks in advance for any help/information.

  2. #2
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746

    try this

    Winsock1.RemoteHost = "wayneschools.com"
    Winsock1.RemotePort = "25"
    Winsock1.Connect "wayneschools.com", 25
    MsgBox "You have Connected"
    Do
    DoEvents
    Loop While Winsock1.State <> sckConnected
    Winsock1.SendData ("HELO yahoo.com" & vbCrLf)

    Winsock1.SendData "mail from:<" & from & ">" & vbCrLf

    Winsock1.SendData "rcpt to: <" & to & ">" & vbCrLf
    Winsock1.SendData ("data" & vbCrLf)

    Winsock1.SendData "subject: " & thesubject & vbCrLf

    Winsock1.SendData themessagebody & vbCrLf

    Winsock1.SendData "." & vbCrLf

    from, to, messagebody, and subject are all strings

  3. #3
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Cool Info.

    Try this link: http://www.vbsquare.com/internet/sendmail-demo/

    Also search on Planet Source Code for SMTP Mailers, Anonymous Mailers etc. http://www.planetsourcecode.com

    Hope this helps
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

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