[linux] Re: user php script veranderen

J.I. Asenjo natxete op xs4all.nl
Zo Jul 29 23:17:46 CEST 2007


On Sun, 29  Jul  2007,  08:30:54PM +0200¨, Hans Paijmans said:
> J.I. Asenjo wrote:
> > On Sun, 29  Jul  2007,  03:07:46PM +0200¨, Hans Paijmans said:
> >> Als ik met mail() van php een email verzend, is de zender
> >> 'wwwrun'. Helaas mag ik vanaf de betreffende computer alleen
> >> als 'paai' mailen. Hoe moet ik dat aanpakken?
> > 
> > volgens mij moet je zoiets kunnen doen:
> > 
> > http://www.webpipe.net/howto/Php_mail_envelope_header

[knip]
 
> Helaas, daar trapt hij niet in.

tja, nog geen code gezien. Dit werkt hier (e-mail adressen aangepast):

---------------mail.php-----------------
<?php
$to_address     = "nasenjo at xs4all.nl";
$email_subject  = "Subject of your message";
$email_body     = "This is the body of the email message!";
$email_header   = "From: Website Name <test op asenjo.nl>\r\n";
$sendmail_args  = "-ftest at asenjo.nl";
mail($to_address, $email_subject, $email_body, $email_header,
$sendmail_args);
?>
 
----------------------------------------
$ php5 mail.php

stukje uit /var/log/mail.log

Jul 29 23:13:20 etch postfix/cleanup[8211]: 64213604763: message-id=<20070729211319.C6AA0604773 op smtp.asenjo.nl>
Jul 29 23:13:20 etch postfix/qmgr[20900]: 64213604763: from=<test op asenjo.nl>, size=943, nrcpt=1 (queue active)
Jul 29 23:13:20 etch postfix/smtpd[8216]: disconnect from localhost[127.0.0.1]
Jul 29 23:13:20 etch amavis[1918]: (01918-08) Passed BAD-HEADER, <test op asenjo.nl> -> <nasenjo op xs4all.nl>, quarantine: badh-RxMTHTQIF3il, Message-ID: <20070729211319.C6AA0604773 op smtp.asenjo.nl>, mail_id: RxMTHTQIF3il, Hits: -0.001, queued_as: 64213604763, 596 ms
Jul 29 23:13:20 etch postfix/smtp[8213]: C6AA0604773: to=<nasenjo op xs4all.nl>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.87, delays=0.19/0.06/0.02/0.6, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=01918-08, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 64213604763)
Jul 29 23:13:20 etch postfix/qmgr[20900]: C6AA0604773: removed
Jul 29 23:13:22 etch postfix/smtp[8217]: 64213604763: to=<nasenjo op xs4all.nl>, relay=mx4.xs4all.nl[194.109.24.139]:25, delay=2.2, delays=0.07/0.06/1.6/0.54, dsn=2.0.0, status=sent (250 2.0.0 mxdrop26.xs4all.nl accepted message l6TLDKSC074778)
Jul 29 23:13:22 etch postfix/qmgr[20900]: 64213604763: removed

het werkt, dus.

-- 
Groeten,
J.I.Asenjo



More information about the Linux mailing list