serving the solutions day and night

Pages

Showing posts with label gmail. Show all posts
Showing posts with label gmail. Show all posts

Sunday, December 25, 2011

Send Email in PHP using GMAIL SMTP Server

Sendmail
  1. Download and Unzip: download sendmail.zip
  2. Open Sendmail.ini in text editor
    Change the following options Sendmail.ini and save.
    smtp_server=smtp.gmail.com

    smtp_port=587

    auth_username=<email_name>@gmail.com
    auth_password=<email_password>

    force_sender=<email_name>@gmail.com
  3. Open your PHP configuration (PHP.ini), Edit and Save:
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    ;SMTP = localhost

    ; http://php.net/smtp-port
    ;smtp_port = 25

    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = me@example.com

    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    sendmail_path ="C:\DNS\Projects\sendmail\sendmail.exe -t"

    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =