Results 1 to 14 of 14

Thread: Simple sending email code???!!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    120

    Simple sending email code???!!

    I search in google and in this forum for a simple sending email code with winsock!! but all what i find is complicated application with many options
    all i want is the basics like "from" , "to" "subject".....
    any help??

  2. #2
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: Simple sending email code???!!

    I don't have any code, but I do have a DLL that implements the SMTP protocol for sending mail. I've been using it for a couple of years and it has never let me down. It's easy to use and the best part, it's free.

    Let me know if you're interested and I'll post it.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    120

    Re: Simple sending email code???!!

    Quote Originally Posted by pnish
    I don't have any code, but I do have a DLL that implements the SMTP protocol for sending mail. I've been using it for a couple of years and it has never let me down. It's easy to use and the best part, it's free.

    Let me know if you're interested and I'll post it.
    First man..Thx for ur help
    but i don't want to use any ocx or dll
    when i said using winsock..I was later going to replace the winsock with an api..
    But thx for ur help

  4. #4
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: Simple sending email code???!!

    No sweat. If I come across anything I'll let you know.

    Good luck.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  5. #5
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: Simple sending email code???!!

    first search for rfc on smtp on the net. this will give you an idea on how smtp works and what to do with winsock to make simple mail transfer.

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Simple sending email code???!!

    For winsock question please use our

    Distributed Computing (multi-tier development) Forum
    (http://www.vbforums.com/forumdisplay.php?f=64)

    You will find at the top there an FAQ,
    (http://www.vbforums.com/showthread.php?t=319832)

    From there there is a guide to sending email
    (http://winsockvb.com/article.php?article_id=20)

    If you dont want to do it using winsock you can do it like this, which will send using default email client

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
    4. ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    5.  
    6. Private Const SW_SHOWNORMAL As Long = 1
    7.  
    8. Private Sub Command1_Click()
    9.     ShellExecute Me.hwnd, "Open", "mailto:[email protected]?Subject=Test", vbNullString, "C:\", SW_SHOWNORMAL
    10. End Sub

    Hope that helps

    Pino

  7. #7
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: Simple sending email code???!!

    Quote Originally Posted by pnish
    I don't have any code, but I do have a DLL that implements the SMTP protocol for sending mail. I've been using it for a couple of years and it has never let me down. It's easy to use and the best part, it's free.

    Let me know if you're interested and I'll post it.

    Could you post it anyway ? I'm kinda interested here
    Zeegnahtuer?

  8. #8
    Fanatic Member
    Join Date
    Jan 2005
    Location
    In front of this pc.
    Posts
    580

    Re: Simple sending email code???!!

    VbSendmail.dll may not be the dll that Shady Soft was referencing for sending email but it is pretty simple to use and allows you to specifiy the smtp server, server authentication info (uname/pwrd), send attachments, etc and it's free.

    Check out http://www.freevbcode.com/ShowCode.Asp?ID=109

  9. #9
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: Simple sending email code???!!

    Quote Originally Posted by thegreatone
    Could you post it anyway ? I'm kinda interested here
    Here's a link to download the DLL: http://www.dimac.net/
    Go to the free downloads page and download w3Jmail.

    Cheers
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  10. #10
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Simple sending email code???!!

    I was playing around with some code earlier for this.
    I am writting a POP3 email DLL for use with my MSN Messenger client I have been writting.

    The basics are pretty simple.
    I think the hardest bit is the handling of the packets and understanding how the POP3 protocol works.

    Anyways, while downloading code, I found this. Not the best app in the world, but simple, to the point, and it works.

    Definately worth a look as it's a good starting point for a POP3 app.

    Woof
    Attached Files Attached Files

  11. #11
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217

    Re: Simple sending email code???!!

    When you need to send mail, you would either need to have an SMTP server, or know how to talk to MX servers. The problem is that ISP's tend to block the ports required, which means you need to get a server that redirects a port.

    If you have all those figured out, then go and search some code for sending email via MX servers.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  12. #12
    New Member
    Join Date
    Feb 2006
    Posts
    10

    Re: Simple sending email code???!!

    does anyone know ith there is something similar to Wokawidget's dll for VB.net?

  13. #13
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: Simple sending email code???!!

    Quote Originally Posted by PFTBurger
    does anyone know ith there is something similar to Wokawidget's dll for VB.net?
    You could post a request over in the .Net section for someone to convert it
    Zeegnahtuer?

  14. #14
    New Member
    Join Date
    Feb 2006
    Posts
    10

    Re: Simple sending email code???!!

    thanks, I just saw the converting tips sticky, so ill give it a bash first.

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