From: Nicholas Mc Guire <der.herr@hofr.at>
To: darshan.ghumare@gmail.com
Cc: linux-c-programming@vger.kernel.org
Subject: Re: How to send mail from C program on Linux
Date: Wed, 28 Oct 2009 14:36:30 +0100 [thread overview]
Message-ID: <20091028133630.GB5728@opentech.at> (raw)
In-Reply-To: <20669019.01256731758094.JavaMail.root@wombat>
On Wed, 28 Oct 2009, darshan.ghumare@gmail.com wrote:
> Hi,
>
> In my project I need to send mail on Linux.
> I have used sendmail to send mail but there are failed to send mail to my gmail account.
>
well there is always ugly insecure brute force:
#include <stdlib.h>
#include <stdio.h>
int main(int argc,char ** argv){
char cmd[128];
sprintf(cmd,"/usr/bin/mail -v root < /tmp/mail");
system(cmd);
return 0;
}
hofrat
next prev parent reply other threads:[~2009-10-28 13:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-28 12:09 How to send mail from C program on Linux darshan.ghumare
2009-10-28 13:36 ` Nicholas Mc Guire [this message]
2009-10-28 14:31 ` Javier Martinez Canillas
2009-10-28 13:43 ` vinit dhatrak
2009-10-28 21:35 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091028133630.GB5728@opentech.at \
--to=der.herr@hofr.at \
--cc=darshan.ghumare@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).