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" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Mian Shafiq-Ur-Rehman wrote: > > > <? > > $email ="[EMAIL PROTECTED]"; > > $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 = [EMAIL PROTECTED] > > 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 = [EMAIL PROTECTED] > > - or - > > SMTP = 123.123.123.123 > sendmail_from = [EMAIL PROTECTED] > > > 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: [EMAIL PROTECTED] > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]