Jump to content

Archived

This topic is now archived and is closed to further replies.

rev2red

How do you get the email to work?

Recommended Posts

What do you have to do to get the website's email system working. I had a gmail account and it wasn't working so I called godaddy.com and they told me I need to use an email is the same as the domain. So I changed the email to an address that matched the website and still no luck.

 

What setting do I need to change to get the emails to send to customer and to received emails from customers?

 

Thank you!

Share this post


Link to post
Share on other sites
What do you have to do to get the website's email system working. I had a gmail account and it wasn't working so I called godaddy.com and they told me I need to use an email is the same as the domain. So I changed the email to an address that matched the website and still no luck.

 

What setting do I need to change to get the emails to send to customer and to received emails from customers?

 

Thank you!

Copy the following to a file on your webserver:

<?php
// A test script for sending mail.  Put your email address below
// and open this script in your browser.

$TO_ADDR = "test@test.com";		  // your email address
$FROM_ADDR = "test@test.com";   // the address to show as "From"
$MESG = "From: $FROM_ADDR\r\n";
$MESG .= "\r\n";
$MESG .= "This is a test\r\n";
if (mail($TO_ADDR,"Testing",$MESG,"From: $FROM_ADDR"))
echo "Mail function succeeded<br />";
else
echo "Mail function FAILED<br />";
ini_set('sendmail_from',$FROM_ADDR);
$MESG = "From: $FROM_ADDR\r\n";
$MESG .= "\r\n";
$MESG .= "This is a test\r\n";
if (mail($TO_ADDR,"Testing with -f and From line in body",$MESG,"From: $FROM_ADDR"))
echo "Mail function succeeded with -f parameter<br />";
else
echo "Mail function FAILED with -f parameter<br />";
?>

 

and change the following:

$TO_ADDR = "test@test.com";		  // your email address
$FROM_ADDR = "test@test.com";   // the address to show as "From"

to your email addresses to test.

 

Then access the script from your browser and paste the output here.

Share this post


Link to post
Share on other sites
This is what I got...

 

Mail function succeeded

Mail function succeeded with -f parameter

Did you replace the email addresses with yours and did you check your mailbox to see if you actually received the mail?

Share this post


Link to post
Share on other sites
Did you replace the email addresses with yours and did you check your mailbox to see if you actually received the mail?

 

 

I did replace the emails with mine. I received 2 emails.

Share this post


Link to post
Share on other sites
I did replace the emails with mine. I received 2 emails.

Ok, then the problem resides on the oscommerce side.

Can you receive mail if you send it through the admin side?

Share this post


Link to post
Share on other sites
Ok, then the problem resides on the oscommerce side.

Can you receive mail if you send it through the admin side?

 

I just tried to use the tool "send email" and I did not receive an email.

Share this post


Link to post
Share on other sites
I just tried to use the tool "send email" and I did not receive an email.

Try this code:

<?php
 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) {
define('SEND_EMAILS', 'true');

if (isset($HTTP_POST_VARS['usehtml']) && ($HTTP_POST_VARS['usehtml'] == '1')) {
  define('EMAIL_USE_HTML', 'true');
} else {
  define('EMAIL_USE_HTML', 'false');
}
 }

 require('includes/application_top.php');

 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) {
mail($HTTP_POST_VARS['to_address'], '[PHP] ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the native php mail() function.' . "\n\n" . $HTTP_POST_VARS['body']);

tep_mail($HTTP_POST_VARS['to'], $HTTP_POST_VARS['to_address'], '[osCommerce] ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the email class osCommerce uses.' . "\n\n" . $HTTP_POST_VARS['body'], $HTTP_POST_VARS['from'], $HTTP_POST_VARS['from_address']);

echo 'E-Mails Sent!<br><br>';
 }
?>
<form name="emailtest" action="testmail.php" method="post">
E-Mail From (name): <?php echo tep_draw_input_field('from'); ?><br>
E-Mail From Address: <?php echo tep_draw_input_field('from_address'); ?><br><br>
E-Mail To (name): <?php echo tep_draw_input_field('to'); ?><br>
E-Mail To Address: <?php echo tep_draw_input_field('to_address'); ?><br><br>
Subject: <?php echo tep_draw_input_field('subject'); ?><br><br>
Body:<br>
<?php echo tep_draw_textarea_field('body', 'virtual', 50, 7); ?>
<br><br>
<?php echo tep_draw_checkbox_field('usehtml', '1'); ?> Send as HTML (overrides the Administration Tool setting)<br><br>
<input type="hidden" name="action" value="send"><input type="submit"><br><br><input type="reset">
</form>

 

Run the script in your browser and fill in the appropiate fields.

Share this post


Link to post
Share on other sites

Seeing as you are on a windows server you have set you mail to SMTP?

admin / configuration / e mail settings

Default is sendmail which will not work on a window box


Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Share this post


Link to post
Share on other sites
Try this code:

<?php
 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) {
define('SEND_EMAILS', 'true');

if (isset($HTTP_POST_VARS['usehtml']) && ($HTTP_POST_VARS['usehtml'] == '1')) {
  define('EMAIL_USE_HTML', 'true');
} else {
  define('EMAIL_USE_HTML', 'false');
}
 }

 require('includes/application_top.php');

 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) {
mail($HTTP_POST_VARS['to_address'], '[PHP] ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the native php mail() function.' . "\n\n" . $HTTP_POST_VARS['body']);

tep_mail($HTTP_POST_VARS['to'], $HTTP_POST_VARS['to_address'], '[osCommerce] ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the email class osCommerce uses.' . "\n\n" . $HTTP_POST_VARS['body'], $HTTP_POST_VARS['from'], $HTTP_POST_VARS['from_address']);

echo 'E-Mails Sent!<br><br>';
 }
?>
<form name="emailtest" action="testmail.php" method="post">
E-Mail From (name): <?php echo tep_draw_input_field('from'); ?><br>
E-Mail From Address: <?php echo tep_draw_input_field('from_address'); ?><br><br>
E-Mail To (name): <?php echo tep_draw_input_field('to'); ?><br>
E-Mail To Address: <?php echo tep_draw_input_field('to_address'); ?><br><br>
Subject: <?php echo tep_draw_input_field('subject'); ?><br><br>
Body:<br>
<?php echo tep_draw_textarea_field('body', 'virtual', 50, 7); ?>
<br><br>
<?php echo tep_draw_checkbox_field('usehtml', '1'); ?> Send as HTML (overrides the Administration Tool setting)<br><br>
<input type="hidden" name="action" value="send"><input type="submit"><br><br><input type="reset">
</form>

 

Run the script in your browser and fill in the appropiate fields.

 

 

What fields do I fill in?

Share this post


Link to post
Share on other sites

Warning: mail() [function.mail]: SMTP server response: 451 See [url="http://pobox.com/~djb/docs/smtplf.html"]http://pobox.com/~djb/docs/smtplf.html[/url]. in D:\Hosting\3154055\html\catalog\testmail.php on line 15

Warning: mail() [function.mail]: SMTP server response: 451 See [url="http://pobox.com/~djb/docs/smtplf.html"]http://pobox.com/~djb/docs/smtplf.html[/url]. in D:\Hosting\3154055\html\catalog\includes\classes\email.php on line 520
E-Mails Sent!

After you run the script it will display the fields.

 

 

That is what I got after I ran it

Share this post


Link to post
Share on other sites
What do you have to do to get the website's email system working. I had a gmail account and it wasn't working so I called godaddy.com and they told me I need to use an email is the same as the domain. So I changed the email to an address that matched the website and still no luck.

 

What setting do I need to change to get the emails to send to customer and to received emails from customers?

 

Thank you!

Godaddy has an email cpanel to set up your email. You manage your email through it.

 

You need to create users(email recipients) i.e. sales@your_domain.com, customer_support@your_domain.com, etc.

 

Once created, this is what you use in your oscommerce store

under MY STORE>>Email Address and Send Extra Order Email field.

 

You also need to know if you're on a linux or windows server, so yo can set your email options.

Share this post


Link to post
Share on other sites
Godaddy has an email cpanel to set up your email. You manage your email through it.

 

You need to create users(email recipients) i.e. sales@your_domain.com, customer_support@your_domain.com, etc.

 

Once created, this is what you use in your oscommerce store

under MY STORE>>Email Address and Send Extra Order Email field.

 

You also need to know if you're on a linux or windows server, so yo can set your email options.

 

 

I created the email with using the godaddy cpanel. I then updated the email under "my store". I am on a Windows server and have the email setting at set to "smtp". I'm still not able to send out emails to customers or receive emails from my website. What can I try next?

Share this post


Link to post
Share on other sites

RVsupply, what file is that php text added to? Or what file is it named and and in what directory? I did not understand your directions.

 

Should there not be a simple edit to fill in the e-mail parameters?

 

I am running a windows server with IX webhosting.


If you can't have fun doing it, it's not worth doing!

Share this post


Link to post
Share on other sites
just download this:http://addons.oscommerce.com/info/901 then install it that is how I got my email to work.

 

 

How do I install that?

Its just some informations, I don't know where theses(in bold) configs are:

 

E-Mail Transport Method smtp

E-Mail Linefeeds LF

Use MIME HTML When Sending Emails true

Verify E-Mail Addresses Through DNS false

Send E-Mails true

SMTP Server Host Address tls://smtp.gmail.com or ssl://smtp.gmail.com

SMTP Server EHLO / HELO Name gmail.com

SMTP Server Port Number 465

SMTP Authentication Required true

SMTP Authentication Username your@domain.com or you@gmail.com

SMTP Authentication Password your password

 

Could someone help me?

Share this post


Link to post
Share on other sites
How do I install that?

Its just some informations, I don't know where theses(in bold) configs are:

 

E-Mail Transport Method smtp

E-Mail Linefeeds LF

Use MIME HTML When Sending Emails true

Verify E-Mail Addresses Through DNS false

Send E-Mails true

SMTP Server Host Address tls://smtp.gmail.com or ssl://smtp.gmail.com

SMTP Server EHLO / HELO Name gmail.com

SMTP Server Port Number 465

SMTP Authentication Required true

SMTP Authentication Username your@domain.com or you@gmail.com

SMTP Authentication Password your password

 

Could someone help me?

 

Did you happen to figure it out? I still can't get the email to work.

Share this post


Link to post
Share on other sites

i cant send emails to my customers, also they dont receive the registration email and when they buy something on my store they dont get the mail :S it only works when i send an email to one of my own domain mails... :S

 

do u know how can i fix it?

 

sorry about my english :S

 

B.r.

Share this post


Link to post
Share on other sites
i cant send emails to my customers, also they dont receive the registration email and when they buy something on my store they dont get the mail :S it only works when i send an email to one of my own domain mails... :S

 

do u know how can i fix it?

 

sorry about my english :S

 

B.r.

 

I am having the exact same problem. If I find a solution I will make sure to message you. Anyone have some new information on how to fix this?

Share this post


Link to post
Share on other sites
I am having the exact same problem. If I find a solution I will make sure to message you. Anyone have some new information on how to fix this?

 

 

i have same problem..

 

dod anybody fix it??

Share this post


Link to post
Share on other sites

×