ajshades Posted April 5, 2004 Posted April 5, 2004 ok when i register an account on my store, I get no account confirmation email (just testing before i let other people use it) whats the deal? everything else is working fine what do i need to do to fix this? thanks adam mccombs
ajshades Posted April 5, 2004 Author Posted April 5, 2004 come on guys its a very simple question....
Guest Posted April 5, 2004 Posted April 5, 2004 In admin-->configuration-->sending extra emails to, just fill in your e-mail adress.
ajshades Posted April 6, 2004 Author Posted April 6, 2004 i don't think i explained this well enough.... when you register a new acount as a customer you should get a confirmation email - correct? thats not happening right now. what do i have to do to get this to work?
peterr Posted April 6, 2004 Posted April 6, 2004 Hi, In 'create_account.php', the function that does the email is called tep_mail() , and it is the osC function that is used in many places to send email. In the file I mentioned, the function tep_mail() is at line 246 , but is only executed if there are no errors with creating the account. If you are sure the account is being created successfully, you would be wise to see what is being passed to the tep_mail() function, so before line 246, add the following: echo $name; echo $email_address; echo EMAIL_SUBJECT; echo $email_text; echo STORE_OWNER; echo STORE_OWNER_EMAIL_ADDRESS; then create a new account, and see what is displayed (echoed). If the values seem correct, then you will need to dig deeper. The function tep_mail() is defined at line 959 of /includes/functions/general.php Notice that tep_mail() expects 6 parametrs to be passed, the same number as echoed above. The first thing tep_mail() checks is to see if you have set "SEND_EMAILS" to true, in the admin functions. If you haven't, you can forget about any emails being sent. If you have, then follow the code down. The function tep_mail() itself is quite small, as you can see, however it calls 2 other functions, the first is to build the message, and the second is to send the message (which actually calls the PHP mail() function. The build_message() function is at line 321 of /includes/classes/email.php The send() function is at line 473 of /includes/classes/email.php By now, you may be getting too bogged down in the osC code. :D Therefore, as I don't know if ANY email works for you, please try the following small PHP script. because in the end, the last function that is called is the PHP function called mail(), therefore, you may need to test that in isolation. <?php mail('[email protected]', 'Test', 'Is this working?', "From: [email protected]\nMIME-Version: 1.0"); ?> Peter
inspire Posted April 28, 2004 Posted April 28, 2004 I'm having a simlar problem. My hosting comany is using Linux and I am running the latest version of OSCommerce. I receive order confirmation emails as well as the extra emails that are sent to the owner etc. I am not receiving emails when the account is created nor when the order status is updated or a comment is added. And in those cases, yes I have the checkbox checked that indicates that the customer should be notified etc. I also do not receive an email when the admin goes into the send email feature under tools. One extra piece of info that may help. Until recently the only emails being sent out were the extra order emails. The customer did not receive a confirmation. To fix that I changed my email settings from sendmail to SMTP. I realize that SMTP is only recommended for windows servers but I tried it and it allowed the customer to receive the order confirmation email. I added the echo statements like you recommended and everything appeared to work fine. I also looked at the tep_mail function and it looks fine. The fact that some emails and getting out and others are not is pretty weird. Any ideas?
peterr Posted April 29, 2004 Posted April 29, 2004 Hi, I have seen a number of people state that they have problems with emails, in general, inconsistancies. TRy This: http://wiki.oscommerce.com/TextSearch?phrase=email or http://www.oscommerce.com/forums/index.php?act...blem%26%2339%3B Also, I'm not entirely convinced that the tep_mail() function is the only osC code that sends emails. I say that because I need to change the whole method in which emails are sent and use another PHP email function to send emails. When I was trying to look at emails and osC, I used a small piece of code to call the PHP mail() function, because if you follow tep_mail() through to the 'sending', that is all it does anyway. So, do some small isolated testing on using the PHP mail() function, to make sure there are no issues with the hosting company you use or their nail server setup,etc. Peter
inspire Posted April 29, 2004 Posted April 29, 2004 As it turns out my hosting company does have a policy (read setting) that 'nobody' is not allowed to send emails out to email addresses that are not part of the domain. They were unwilling to change it. I understand why. But I was unwilling to change hosts so what I did is append a bogus email address to the to: field of every email sent by my site. This bogus email address is for my domain. I realize that is a very ugly hack but it has completely fixed the problem for me. For those that are interested there are only two files that you need to modify to do this. They are: 1) includes/classes/email.php 2) admin/includes/classes/email.php Just find the section where the code formats the to: field.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.