dxmonger
Posts: 5
|
| Posted: 08/08/2010, 1:53 PM |
|
I've been using CCS for a little while now and have a nice intranet app that works well. Users fill out forms to update a database, etc. The web server (Apache) runs on a Windows box (which is not also a mail server).
Now I need to notify users via email as the user clicks to submit a form. I've tried a few things without luck. I've tried server Add Action... Send Email.
Here's what I tried in my php.ini file.
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = mail.mydomain.com
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from =dxadmin@mydomain.com
and in my custom php code via CCS...
global $ECO1;
ini_set("SMTP", "mail.mydomain.com");
$to = "dx@mydomain.com";
$subject = "Test";
$message = "test";
$from = "dxadmin@mydomain.com";
$charset = "Windows-1252";
$transferEncoding = "";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain; charset=$charset\nContent-Transfer-Encoding: $transferEncoding";
mail ($to, $subject, $message, $additional_headers);
ini_restore("SMTP");
//End Send Email
No luck.
I've even created a gmail account - it would be fine if the notification came from there. That would require that the php pass the form contents to gmail for sending via SMTP. Not sure how to do that though.
Any help?
|