Thread: C code for Sending Email with attachment

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    1

    C code for Sending Email with attachment

    Hi,

    I need the C code for Sending Email with attachment through
    SMTP protocol, running under linux platform.



    Thanks

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Yeah? Well I need US$1 million. What are the chances someone's just going to give it to me?

  3. #3
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Quote Originally Posted by Mr coder View Post
    I need the C code for Sending Email with attachment through
    SMTP protocol, running under linux platform.
    Good for you!

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    115
    Quote Originally Posted by rags_to_riches View Post
    Yeah? Well I need US$1 million. What are the chances someone's just going to give it to me?
    Hope I could earn that much money in programming..

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    26
    if you still need it pm me, i have written one some time ago, but i cant tell you now how much it is reliable

  6. #6
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Mr coder View Post
    Hi,

    I need the C code for Sending Email with attachment through
    SMTP protocol, running under linux platform.
    As a potential complication that may or may not apply to your situation: I used to do this using perl and sendmail or postfix. It was always a riot to send mail "from" my mom to my sister, and then vice versa, etc.

    However, such a custom personal mail system was apparently a popular strategy with pervayors of spam as well (hope you're not one of those). Thanks to that, it is now impossible today: a large percentage (possibly most) of mail servers (eg, the one receiving your mail) use a common list of other "trusted" servers and simply do not accept anything from anyone else. Some of the those may send you a bounce notice saying as much, but last time I checked, most of them behave as if the message were accepted, then they throw it out without telling you or the intended recipient.

    So if you were hoping you could just send mail without going thru a real ISP you will be out of luck, I promise, regardless of how honest you are. If you will only be sending to one particular place and you can make arrangements with the mail server there it will work, otherwise don't waste your time.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  2. Proposal: Code colouring
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 07:23 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  4. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM