AlegroCart open source E-commerce
Web hosting by Host1Plus

How config send email on localhost when register accounts?

Issues when installing or upgrading AlegroCart

How config send email on localhost when register accounts?

Postby sakybc » Fri Jan 07, 2011 2:38 am

Hi all !
i setup Alegrocart on localhost.
my site: localhost/vien
my directory: D:\xampp\htdocs\vien
when user register, it will sent email with error :

Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in D:\xampp\htdocs\vien\library\mail\mail.php on line 179

Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in D:\xampp\htdocs\vien\library\mail\mail.php on line 179

Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\vien\library\mail\mail.php:179) in D:\xampp\htdocs\vien\library\environment\response.php on line 23

when Enter again will see:

Notice: Undefined variable: url in D:\xampp\htdocs\vien\catalog\controller\account_create.php on line 30

Fatal error: Call to a member function ssl() on a non-object in D:\xampp\htdocs\vien\catalog\controller\account_create.php on line 30

Please help me.Thanks you very much.
sakybc
 
Posts: 1
Joined: Fri Jan 07, 2011 2:27 am

Re: How config send email on localhost when register accoun

Postby Brent » Fri Jan 07, 2011 4:16 am

In XAMPP\php\php.ini goto to line 1100
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = yourmailsever.com uncomment this line (remove semi-colon ( ; )at the start )
;username = xxxxxx
;pasword = xxxxx
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = admin@validemailserver.com uncomment this line (This one is optional)

you can use the same mail server information the you use on this computer to send email.

As for the messaged on line 30 when you try again, it is a bug you found. You are actually logged in.
Only the email response did not happen, but the customer account was created.
account_create.php line 30 is
Code: Select all
$this->response->redirect($url->ssl('account'));

should be
Code: Select all
$this->response->redirect($this->url->ssl('account'));
User avatar
Brent
Site Admin
 
Posts: 4243
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: How config send email on localhost when register accoun

Postby citadmin » Fri Jan 07, 2011 2:24 pm

Brent I new to AlegroCart. This my issue and how do I fix it? Thanks

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\alegrocart\tasteofafrica\library\mail\mail.php on line 179

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\alegrocart\tasteofafrica\library\mail\mail.php:179) in C:\xampp\htdocs\alegrocart\tasteofafrica\library\environment\response.php on line 23
citadmin
 
Posts: 6
Joined: Thu Jan 06, 2011 5:29 pm

Re: How config send email on localhost when register accoun

Postby Brent » Fri Jan 07, 2011 3:29 pm

Give me a few hours and I'll come up with something that will fix the test site problem.
User avatar
Brent
Site Admin
 
Posts: 4243
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: How config send email on localhost when register accoun

Postby Brent » Fri Jan 07, 2011 6:09 pm

I have place 3 options to work a round this problem on windows servers.
Mail FAQ
User avatar
Brent
Site Admin
 
Posts: 4243
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: How config send email on localhost when register accoun

Postby citadmin » Fri Jan 07, 2011 7:00 pm

Brent

Thanks for the solution you posted in Mail FAQ. I host my sites on my two windows boxes, so they are technically not test sites. I want to be able to configure AlegroCart sites to send mail using email address and smtp server on port 465. Will what you posted in Mail FAQ work? I don't want to have to install a mail server no my box just I can send mail.
Thank you for your help and much respect.
citadmin
 
Posts: 6
Joined: Thu Jan 06, 2011 5:29 pm

Re: How config send email on localhost when register accoun

Postby Brent » Sat Jan 08, 2011 6:30 am

The first solution is what you need to use. When you set the SMTP in php.ini, the mail function is available for all sites.
Just below the SMTP = your valid mail.XXXX. smtp, You will set a port setting smtp_port = 25
Change this to smtp_port = 465
You will have to stop and start apache to make changes in php.ini take effect.
Let me know how it works out for you.
User avatar
Brent
Site Admin
 
Posts: 4243
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: How config send email on localhost when register accoun

Postby citadmin » Sat Jan 08, 2011 6:49 am

Heya Brent

My smtp requires a username = user@att.net and password = email password. How would you add those in php.ini?

Thanks
citadmin
 
Posts: 6
Joined: Thu Jan 06, 2011 5:29 pm

Re: How config send email on localhost when register accoun

Postby Brent » Sat Jan 08, 2011 10:33 am

Try adding to php.ini:
Code: Select all
username = USERNAME
password = YOUR_PASSWORD

I have never tried it.
I use HMAIL mail server on a windows server. I have set it up to use the ISP SMTP and handle authentification.
It will allow you to handle many email accounts through one server.
User avatar
Brent
Site Admin
 
Posts: 4243
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: How config send email on localhost when register accoun

Postby citadmin » Sat Jan 08, 2011 5:05 pm

Okay Brent, I have downloaded HMail. I will do a full install later on tonight. The obvious question is how do I configure it AlegroCart to work with HMail? Which PHP files do I need to modify to get it to work? I will check back after I finish my HMail Server install. Thanks
citadmin
 
Posts: 6
Joined: Thu Jan 06, 2011 5:29 pm

Next

Return to Installation & Upgrade Support

Who is online

Users browsing this forum: No registered users and 5 guests

cron