smithveg Posted May 28, 2006 Posted May 28, 2006 Hello buddies, I'm not sure whatever i should put this thread here. Recently i have create a simple send mail .php which i want to integrate it in my sites. My code as below:- <?php $from = $_POST["fromemailadd"]; $to = $_POST["toemailadd"]; $subject = $_POST["subject"]; $headers = 'From:$from' . "\r\n" . 'Reply-To:$from' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $body = $_POST["message"]; if (mail($to, $subject, $body, "From:$from" . "\r\n" . "Reply-to:$from")) { echo("<p>Message " . $i . " successfully sent... " . $to . "... " . $from . "...</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?> It worked when i try to send mail to [email protected] or yahoo But i can't even send mail to hotmail.com... if i want to send to hotmail... i must send like this, send to "[email protected], [email protected]" It can send now. If i just put send to "[email protected]" it cannot send. It show me that hotmail must put in second place. After all this done... i would like to attach file... so..how can i do it? Ex. i will place to hardcode file in a directory... then everytime a person send mail.. it will automatically attach that will inside the mail... Can anyone help me? smithveg Quote **** Hello World! ^.^ I'm a Internet naive. Browse my working profile Malaysia Web Services - OPerion Website Marketing System
Guest Posted May 28, 2006 Posted May 28, 2006 Hello buddies, I'm not sure whatever i should put this thread here. Recently i have create a simple send mail .php which i want to integrate it in my sites. My code as below:- <?php $from = $_POST["fromemailadd"]; $to = $_POST["toemailadd"]; $subject = $_POST["subject"]; $headers = 'From:$from' . "\r\n" . 'Reply-To:$from' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $body = $_POST["message"]; if (mail($to, $subject, $body, "From:$from" . "\r\n" . "Reply-to:$from")) { echo("<p>Message " . $i . " successfully sent... " . $to . "... " . $from . "...</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?> It worked when i try to send mail to [email protected] or yahoo But i can't even send mail to hotmail.com... if i want to send to hotmail... i must send like this, send to "[email protected], [email protected]" It can send now. If i just put send to "[email protected]" it cannot send. It show me that hotmail must put in second place. After all this done... i would like to attach file... so..how can i do it? Ex. i will place to hardcode file in a directory... then everytime a person send mail.. it will automatically attach that will inside the mail... Can anyone help me? smithveg I doubt that what you posted should be posted anywhere. What are you trying to do? Why are you trying to do it? Is it related to OSCommerce? Quote
smithveg Posted May 28, 2006 Author Posted May 28, 2006 I doubt that what you posted should be posted anywhere. What are you trying to do? Why are you trying to do it? Is it related to OSCommerce? ya, i want to put this function in osc's admin news. in which i allos the admin to send the newsletter with the fix promotion on that months to customer... then the admin site just need to change the information in that file... is that convenient? If not, i just can copy and paste the information. smithveg Quote **** Hello World! ^.^ I'm a Internet naive. Browse my working profile Malaysia Web Services - OPerion Website Marketing System
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.
Note: Your post will require moderator approval before it will be visible.