CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2005
    Posts
    31

    Question Send Email without SMTP Server

    I am newbie.
    I try to send email without SMTP Server or from fake email account. It's for registration account which send activation code to new user email but prevent the user to reply back from their email. Someone know how to do it ?

    I try using mail() but it always returns FALSE.
    Last edited by Jackyquah; September 8th, 2005 at 06:59 AM.

  2. #2
    Join Date
    May 2004
    Location
    45,000FT Above Nevada
    Posts
    1,539

    Re: Send Email without SMTP Server

    You can write/buy/install a small SMTP server on your own computer and it will send the email directly to the users POP3 server. If you don't want them to respond to this email just put that statement in the email that this is an unmonitored email account, do not reply to this email, that is the standard way.
    Jim
    ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII

    "The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.

    "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: Send Email without SMTP Server

    Quote Originally Posted by Jackyquah
    I try using mail() but it always returns FALSE.
    Mail requires a SMTP server and all settings correctly set up to read the SMTP server. Since SMTP is not a receiving server, there is nothing on SMTPs end that will keep it from being repliable. If you want, you can set the headers reply to as a different email address. From the receiving server, you will have to block the replies. This can't be done with SMTP. SMTP only listens and sends off a packet.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4
    Join Date
    Sep 2005
    Posts
    2

    Question Re: Send Email without SMTP Server

    Quote Originally Posted by Vanaj
    You can write/buy/install a small SMTP server on your own computer and it will send the email directly to the users POP3 server. If you don't want them to respond to this email just put that statement in the email that this is an unmonitored email account, do not reply to this email, that is the standard way.
    How can I write/install a small SMTP server and...
    can you put a short code to explain how to send an email?
    Can we send an email without especify a server? How?

    c ya!

  5. #5
    Join Date
    May 2004
    Location
    45,000FT Above Nevada
    Posts
    1,539

    Re: Send Email without SMTP Server

    You create/buy a small SMTP server and install it on your local machine, then when sending you email you use YOUR SMTP server not an ISP's and your SMTP server will act just like an ISP's and send the email directly to the POP server of the intended person(s). I use the TCP/IP toolbox from http://www.theultimatetoolbox.com/ to create my SMTP server, they include the source code with their toolbox and is fully MFC compliant.
    Jim
    ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII

    "The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.

    "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.

  6. #6
    Join Date
    May 2002
    Posts
    10,943

    Re: Send Email without SMTP Server

    Quote Originally Posted by Vanaj
    You create/buy a small SMTP server and install it on your local machine, then when sending you email you use YOUR SMTP server not an ISP's and your SMTP server will act just like an ISP's and send the email directly to the POP server of the intended person(s). I use the TCP/IP toolbox from http://www.theultimatetoolbox.com/ to create my SMTP server, they include the source code with their toolbox and is fully MFC compliant.
    Unless you want to waste money, just search Google for free SMTP Servers. There is also a post of one as an attachment on one of my threads.

    http://www.google.com/search?hl=en&q...=Google+Search
    http://www.codeguru.com/forum/showthread.php?t=352536
    Last edited by peejavery; September 8th, 2005 at 11:40 PM.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  7. #7
    Join Date
    Mar 2009
    Posts
    1

    Re: Send Email without SMTP Server

    Hi,

    it's simple

    use SendMail.dll for it

    //Now prepare your message.
    MailMessage mail = new MailMessage();
    mail.To.Add("[email protected]");
    mail.From = new MailAddress("[email protected]");
    mail.Subject = "Send email without SMTP server";
    mail.Body = "Yep, its workin!!!!";

    //Send message
    string domain = mail.To[0].Address.Substring(mail.To[0].Address.IndexOf('@') + 1);
    //To Do :need to check for MX record existance before you send. Left intentionally for you.
    string mxRecord = SendSMTP.DnsLookUp.GetMXRecords(domain)[0];
    SmtpClient client = new SmtpClient(mxRecord);
    client.Send(mail);

    Go to http://dvgoswami.googlepages.com for complete details.

    Do not use Dll provided for commercial use.
    it should be used for only testing purpose.

    Done!

    D V Bava
    Attached Files Attached Files

  8. #8
    Join Date
    May 2002
    Posts
    10,943

    Re: Send Email without SMTP Server

    Welcome to the forums dvgoswami.

    Please keep your posts relevant. This thread is 4 years old!
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

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

Featured