leeroy78 Posted March 14, 2006 Share Posted March 14, 2006 Hi, We're having a problem with our php form sending to yahoo, aol, etc. The script is below. I believe it's using the standard SMTP of the server. I'd like it to use a username and password to authenticate through one of my accounts in mailenable and use that SMTP. Thanks.<?php// send to variables//---- START EDIT HERE ------$sendTo = $_POST["email"];$subject = "Question";/// ---- STOP EDIT HERE ------// header information not including sendTo and Subject// these all go in one variable. First, include From:$headers = "From: " . $_POST["name"] ." ". "<" . $_POST["email"] .">\r\n";// next include a replyto$headers .= "Reply-To: " . $_POST["email"] . "\r\n";// often email servers won't allow emails to be sent to// domains other than their own. The return path here will// often lift that restriction so, for instance, you could send// email to a hotmail account. (hosting provider settings may vary)// technically bounced email is supposed to go to the return-path email$headers .= "Return-path: " . $_POST["email"];// now we can add the content of the message to a body variable$body = "Full Name: " . $_POST["name"] ."\r\n". "Email: " . $_POST["email1"] ."\r\n\r\n". "--------Ask The Doctor--------" . "\r\n" . "Message: " . $_POST["message"];// once the variables have been defined, they can be included// in the mail function call which will send you an emailmail($sendTo, $subject, $body, $headers);?> Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted March 14, 2006 Share Posted March 14, 2006 This is not a service. If you would like help learning how to do something using php, then please ask. Quote Link to comment Share on other sites More sharing options...
leeroy78 Posted March 14, 2006 Author Share Posted March 14, 2006 [!--quoteo(post=354742:date=Mar 13 2006, 08:48 PM:name=hitman6003)--][div class=\'quotetop\']QUOTE(hitman6003 @ Mar 13 2006, 08:48 PM) [snapback]354742[/snapback][/div][div class=\'quotemain\'][!--quotec--]This is not a service. If you would like help learning how to do something using php, then please ask.[/quote]I thought I was asking Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.