Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

using a remote SMTP server to send mail (PHP)

cmario00cmario00 Member Posts: 12
My php script is in a intranet server, but I need to be able to send mail to anyone. To do this i need to send mail through a remote mail server. I configured the php.ini file as follows:

SMTP = remoteMailServer_Addr

and tryed commenting, and uncommenting the following:

sendmail_from = address@remoteMailServer
sendmail_path = /usr/sbin/sendmail -i -t

For some reason it will not use the remote Mail server to send the emails (even when i comment the sendmail stuff). Can anyone give me a hint as to what is going on.

Comments

  • orosadoorosado Member Posts: 1
    I bet your webserver is Unix. What you're trying to do only works with Windows server. Check the PHP manual. Forget the PHP function mail(), it is full of bugs and doesn't work as they say. Instead use custom function to send mail. For a multiplatform solution, use a package such as phpmailer (http://phpmailer.sourceforge.net/). That package can handle multiple SMTP servers, sendmail, or mail(). Besides it is easier to use than mail() and is more customizable. I hope this helps...

    orosado

    : My php script is in a intranet server, but I need to be able to send mail to anyone. To do this i need to send mail through a remote mail server. I configured the php.ini file as follows:
    :
    : SMTP = remoteMailServer_Addr
    :
    : and tryed commenting, and uncommenting the following:
    :
    : sendmail_from = address@remoteMailServer
    : sendmail_path = /usr/sbin/sendmail -i -t
    :
    : For some reason it will not use the remote Mail server to send the emails (even when i comment the sendmail stuff). Can anyone give me a hint as to what is going on.
    :

  • Justin BibJustin Bib USAMember Posts: 0

    ___ / http://forcoder.org / free ebooks and video tutorials about / Swift C++ C# Perl C JavaScript Scratch PL/SQL Ruby MATLAB PHP R Assembly Delphi Visual Basic .NET Java Visual Basic Go Objective-C Python Hack Scala Dart FoxPro Erlang Rust Fortran ML Apex Ada Alice SAS Kotlin COBOL F# ABAP Crystal Logo Lua Clojure LabVIEW Lisp Transact-SQL D Awk VBScript Julia Scheme Bash Prolog / ________

Sign In or Register to comment.