[H-GEN] File Atachments With Sendmail

Luke Grant Luke.G at uq.net.au
Sat May 30 02:45:56 EDT 1998


At 05:14 PM 5/29/98 +1000, you wrote:
>On Fri, May 29, 1998 at 04:45:52PM +1000, 
>   "Web Express Humbug email news feed" wrote:
>
>(is there any reason this isn't "Luke" ? At the very least, From:'s aren't
>that different between mail and news...)
>

Oops...i set up an account at work for humbug and my boss was playing with
it...didnt realise he did that...I will change it on monday.


>You're then left with a choice of using a mail reader like mutt, and hoping
>it supports the right command line arguments (mutt does, for example, but
>may not be quite automatable enough, I dunno); finding a program that does
>the MIME-encoding -- mpack comes to mind, if you have it installed i
>(mpack.deb); or alternatively reading the RFCs and rolling your own MIME
>parser.
>

I will look into it. Thanks.

>In general, I find sending mail from a program more trouble than it's
>worth. This is what scripts -- perl, bash or whatever -- are good at.

Time to get out my Perl book then.


>
>[the following is for people playing along at home; I presume these faults
>are due to miscopying from your code to your mail]
> 

Damn...I was in a rush. Please be kind everyone. And yes i was copying it
from one screen to another.

>> FILE *mail;
>> char command[256] = "/usr/lib/sendmail ";
>> char *destination;
>> 
>> destination = "me at where.it.gets/sent";
>> strcpy(command,destination);
>  ^^^^^^ strcat
>> mail = popen(command,"w");
>> if (mail = NULL) exit(0);
>           ^ ==
>> fprintf(mail,"From: user at the.cee.program\n");
>                      ^^^^^^^^^^^^^^^^^^^^ the-cee-program at my.host.name.au
>
>[this way you (a) can redirect replies somewhere appropriate, and (b)
> if the mail goes off somewhere stupid, other admins don't get annoyed
> trying to work out who's sending silly mail]
>

In my actual program there is a real address there but i didnt think it
necissary for this mail. Sorry.

Thanks for the help,
Luke



----------------------- HUMBUG General List --------------------------------
echo "unsubscribe general" | mail majordomo at humbug.org.au # To Unsubscribe



More information about the General mailing list