Re: How to send mail from C program on Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Oct 2009, darshan.ghumare@xxxxxxxxx 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

--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux