i think you will need to make use of a pear package to be able to do this.
pear package: http://pear.php.net/package/Mail
examples: http://blog.thekimsfamily.com/archives/3
docs: http://pear.php.net/manual/en/package.mail.mail.factory.php
       http://pear.php.net/manual/en/package.mail.mail.send.php

i dont think the built in php mail function can do authentication.
you can only change the settings avaliable in the php.ini

------------------------------------------------------------------------
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = y...@yourdomain

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
------------------------------------------------------------------------

working for the first time with pear packages can sometimes be tricky to get going, but once all is set you wont have any probs.

i think this will push you in the right direction

"revDAVE" <c...@hosting4days.com> wrote in message news:c625c359.397af%c...@hosting4days.com...
[Newbie]

Hi folks,

I'm trying to set up some basic php send mail scripts - and I'm curious of
the best way to go...


I checked these basics out:

http://us.php.net/manual/en/function.mail.php

And got this code below going, but I'll bet I need a bit more - like adding
authentication - smtp - port - sending user / pass etc.

Any hints how to get this to the next level?

Thanks in advance - dave

--------------------------------

<?php
$to = 'nob...@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmas...@example.com' . "\r\n" .
'Reply-To: webmas...@example.com' . "\r\n";

mail($to, $subject, $message, $headers);
?>




--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




__________ Information from ESET Smart Security, version of virus signature database 4054 (20090505) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature 
database 4054 (20090505) __________

The message was checked by ESET Smart Security.

http://www.eset.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to