Problem - Sending mail

From: Date: Sun, 25 Mar 2001 15:04:54 +0000
Subject: Problem - Sending mail
Groups: php.windows 
Request: Send a blank email to php-windows+get-6288@lists.php.net to get a copy of this message
Hi, Background: ------------- I'm developing a web application using PHP, and want to automatically mail users on certain events (eg. new user logging in, etc). My web host does not provide dial-up and SMTP services, so my mail host is at a different domain to my web site. Problem: --------- If I use the PHP mail() function after calling ini_set("SMTP", "my.smtp.server") and ini_set("sendmail_from", "user@my_domain"), mail gets sent but the From details are set to www@<web_host_domain_name> which is not what I want. I've tried using sockets and sending directly to the SMTP server, but when I do RCPT TO:<user@my_domain> the server sends back 550 <user@my_domain> Relaying denied. The connection (HELO) and MAIL FROM commands are accepted by the mail host. I'm not a mail guru, and only have a very basic understanding of SMTP, but I would have thought that if my mail host will process messages from my web host, it should also process messages sent via a socket connection. I realise this is not a PHP problem, but someone else here has probably come across the same thing, so it's worth a shot. :-) Any help very gratefully received. Andrew Parry Parrible Limited andrewp@parrible.co.uk

« previous php.windows (#6288) next »