Page 2 of 2 FirstFirst 12
Results 41 to 56 of 56

Thread: Simple VB emailer

  1. #41

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Simple VB emailer

    No, this is a much more complex topic.

  2. #42
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Simple VB emailer

    I wonder if this works i need it:

    VB Code:
    1. Do until send = 20
    2. With SMTP
    3.  .Sender = send
    4.  .Recipient = "whomever@" & send & ".com"
    5.  .SMTPhost = "smtp.myserver.com"
    6.  .Subject = "SMTP test"
    7.  .OpenMail
    8.  If Not .Connected Then Exit Sub
    9.  .Send "Bill,"
    10.  .CloseMail
    11. End With
    12. send = send + 1
    13. doevents
    14. loop

    will this send 20 emails to one person?

    506C65617365205261746520506F7374732E2E2E

  3. #43
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Simple VB emailer

    Quote Originally Posted by Iron Skull
    I wonder if this works i need it:

    VB Code:
    1. Do until send = 20
    2. With SMTP
    3.  .Sender = send
    4.  .Recipient = "whomever@" & send & ".com"
    5.  .SMTPhost = "smtp.myserver.com"
    6.  .Subject = "SMTP test"
    7.  .OpenMail
    8.  If Not .Connected Then Exit Sub
    9.  .Send "Bill,"
    10.  .CloseMail
    11. End With
    12. send = send + 1
    13. doevents
    14. loop

    will this send 20 emails to one person?
    Why would you want to send the same email to the same person 20 times?


    Has someone helped you? Then you can Rate their helpful post.

  4. #44
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Simple VB emailer

    Someone asked me to make a program that sends one email more often at once i dont know why

    506C65617365205261746520506F7374732E2E2E

  5. #45
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Simple VB emailer

    were can i find the Dll?

    506C65617365205261746520506F7374732E2E2E

  6. #46
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Simple VB emailer

    What dll?


    Has someone helped you? Then you can Rate their helpful post.

  7. #47
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Simple VB emailer

    i meen OCX i already found it

    506C65617365205261746520506F7374732E2E2E

  8. #48
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Simple VB emailer

    Hi moeur, how can I send the e-mail in html format ?

    I tried something like:
    Code:
         .Send "<html><body>"
         .Send "Testing...<br>"
         .Send "</body></html>"
    But that just sends as is, it does not convert to html on the receiving side...

  9. #49

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Simple VB emailer

    how can I send the e-mail in html format ?
    I don't think this is part of the Simple Mail Transfer Protocol but is instead something in the mail message that the client (like outlook) sees and knows the rest of the message is html.

    I don't know what that is. If I could see the entire message sent to outlook including all the header info the I could see it.

    I check around...

  10. #50

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Simple VB emailer

    try adding somthing like
    Content-Type: html/text
    I played around a little but didn't get it quite right
    add a line to the classes OpenMail method after the part where it sends the subject
    VB Code:
    1. Winsock.SendData "Content-Type: html/text" & vbCrLf
    I'll play some more if I get time later.

  11. #51

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Simple VB emailer

    I posted the final solution to this earlier, but for some reason my post was deleted.

    Add this line to the OpenMail subroutine somewhere
    VB Code:
    1. Winsock.SendData "Content-Type: html/text; charset=ISO-8859-1" & vbCrLf

  12. #52
    New Member
    Join Date
    Apr 2006
    Posts
    1

    Re: Simple VB emailer

    I tried this code , but i keep getting an error in the CloseMail sub.
    Gives me an error about wrong connection status? Anyone seen this?

  13. #53

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Simple VB emailer

    show me how you are using it.

  14. #54
    New Member
    Join Date
    Nov 2005
    Posts
    7

    Re: Simple VB emailer

    Hi ,

    i try sending using normal address it works(eg. [email protected]) however if I use something like [email protected] I will receive an error . can you teach me how to send an email using IP address.

    Thanks

  15. #55
    New Member
    Join Date
    Nov 2006
    Posts
    1

    Re: Simple VB emailer

    Hi,
    I am not able to send mails to multiple recipients. If i send it to single recipeint then it works fine, but it fails everytime i try sending it to more then one recipient.

    i need help pls.

  16. #56
    New Member
    Join Date
    Mar 2012
    Posts
    1

    Re: Simple VB emailer

    Quote Originally Posted by moeur View Post
    It's been a long time since I used VB5. Try this prpject to see if it works. Then you can incorporate it into your project.
    Hi There,

    I am new to this forum, I tried ur' code but unable to sending mails. I am getting the error like "runtime error 40020" and the position is "If Not .Connected Then Exit Sub"

    Best regards,
    Kotinadh

Page 2 of 2 FirstFirst 12

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