hey guys,

I'm trying to simply use the mail function. I'm using ubuntu 8.10 and have installed sendmail. My php.ini config is:

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

and for testing purposes my php is:

$to = 'myemail@myemail.com';	
		$subject = 'test';
		$message = 'text';
		$headers = 'From: myemail@myemail.com' . "\r\n" .
    			'Reply-To: myemail@myemail.com' . "\r\n" .
    			'X-Mailer: PHP/' . phpversion();

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

		echo 'message sent';

Can anyone confirm whether this is correct or if i'm going wrong somewhere?
Thanks, nonshatter

Member Avatar for nileshgr

Loooks good, It should work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.