Re: Prob with Send mail using mail()
| From: | Giro De Roover | Date: | Fri, 23 Mar 2001 14:41:17 +0000 |
| Subject: | Re: Prob with Send mail using mail() | ||
| References: | 1 2 3 4 5 6 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-6246@lists.php.net to get a copy of this message | ||
Dear andy,
what if your smtp requires authentication?
Any idea??
Thanks Giro
______________________________________________
Hello,
Anyone have experienced difficulties with a broadband, cable, dsl setting
smtp for the mail fonction, where the smtp requires authentication. I am
actually having a nightmare for sending the form .but I am making progress
since I am able now to locate the problem.
Thanks for the help
"Andy Hoffman" <andy.hoffman@bms.com> wrote in message
news:39ECB549.D2A354DD@bms.com...
> Mian Shafiq-Ur-Rehman wrote:
>
> > <?
> > $email ="msrehman@mail.com";
> > $subject="Hai Dear Friend";
> > $message="Testing PHP mail";
> > $headers=" ";
> > mail($email ,$subject,$message,$headers)
> > ?>
>
> First, it is not necessary to send a BLANK headers string in your call to
> the mail function... simply call it like this:
>
> mail($email, $subject, $message);
>
> Also, note that you left off the final ";" (semi-colon) on the line which
> calls the mail function... just check to make sure the line is terminated
> with a semi-colon in your script.
>
> > AND the settings in php.ini are
> >
> > SMTP = leo
> > sendmail_from = me@localhost.com
>
> OK, there are 2 scenarios you can use when accessing your SMTP server...
> 1) you have the SMTP server installed on the SAME computer as your running
> web server
> -or-
> 2) you have the SMTP server running on another computer/server, to which
you
> have DIRECT IP access (via DNS naming, or static IP addressing) - for the
> sake of our example, I'll say the SMTP server is on "mysmtp.mydomain.com"
or
> IP address "123.123.123.123". Here's what your PHP.INI lines should look
> like in either of these cases...
>
>
> For Example 1 - SMTP on same computer as Web Server -
>
> SMTP = localhost
> sendmail_from = myusername@localhost
>
>
> For Example 2 - SMTP on differenct computer -
>
> SMTP = mysmtp.mydomain.com
> sendmail_from = myusername@mydomain.com
>
> - or -
>
> SMTP = 123.123.123.123
> sendmail_from = myusername@123.123.123.123
>
>
> So, depending on your setup of the web server and it's access to the SMTP
> server, you'll use one of these examples, substituting the correct values
> for "myusername", "mydomain", etc.
>
> That help at all?
>
> --
> Andy Hoffman
> Web Developer
> Bristol-Myers Squibb
> email: andy.hoffman@bms.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>