Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

****

Hello World! ^.^ I'm a Internet naive. Browse my working profile

Malaysia Web Services - OPerion Website Marketing System

Posted
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?

Posted
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

****

Hello World! ^.^ I'm a Internet naive. Browse my working profile

Malaysia Web Services - OPerion Website Marketing System

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...