Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Windows, SendMail, PHP and Problems...

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1759 Views
  • Landmine
    Avatar
    Community Member
    11 Posts

    Windows, SendMail, PHP and Problems... Link to this post

    So I'm running SS on a Server 2008 box with PHP Version 5.2.6 (http://www.esfiles.com/info.php) and I wanted to have SS be able to email, and since I don't host any mail on this server thanks to Google Apps I'm having a lot of trouble working with the PHP and SendMail to get it to send out emails.

    I followed this guide, but no such luck.
    http://digiex.net/guides-tutorials/544-configuring-php-under-windows-use-gmail-external-smtp-server-ssl.html

    Here are some of my config files

    php.ini
    -----------------

    sendmail_path = "C:\inetpub\sendmail\sendmail.exe -t -i"

    -----------------

    sendmail.ini
    -----------------

    smtp_server=smtp.gmail.com

    ; smtp port (normally 25)

    smtp_port=587

    ; SMTPS (SSL) support
    ; auto = use SSL for port 465, otherwise try to use TLS
    ; ssl = alway use SSL
    ; tls = always use TLS
    ; none = never try to use SSL

    smtp_ssl=ssl

    default_domain=domain.com
    error_logfile=error.log
    debug_logfile=debug.log

    auth_username=<GOOGLE APPS EMAIL ACCOUNT>
    auth_password=<PASSWORD>

    force_sender=<GOOGLE APPS EMAIL ACCOUNT>

    -----------------

    http://www.esfiles.com/mail.php
    -----------------
    <?php
    $to = "user@domain.com";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "user2@domain2.com";
    $headers = "From: $from";

    if (mail($to,$subject,$message,$headers)) {
    echo "success!";
    } else {
    echo "fail…";
    }
    ?>
    -----------------

    I'm really just lost here. So any help would be amazing. Thanks again all.

  • Landmine
    Avatar
    Community Member
    11 Posts

    Re: Windows, SendMail, PHP and Problems... Link to this post

    For now I'm using MailEnable on my server to work as the SMTP from GoDaddy, however now it wont send emails because the email has [ ] in it.

    So can I change the email templates so they dont include those [ ] in the plain text version

    Example:
    Here is your password reset link[http://www.esfiles.com/Security/changepassword?h=0101010101010101010101]

    1759 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.