Post by angelo » Fri Feb 03, 2012 8:08 pm

Hi there,
How could I manage to get an email alert when a customer instert/edit/or delete entries from his addresses?

---
I'm trying to add this code

Code: Select all

                $mail = new Mail(); 
                $mail->protocol = $this->config->get('config_mail_protocol');
                $mail->parameter = $this->config->get('config_mail_parameter');
                $mail->hostname = $this->config->get('config_smtp_host');
                $mail->username = $this->config->get('config_smtp_username');
                $mail->password = $this->config->get('config_smtp_password');
                $mail->port = $this->config->get('config_smtp_port');
                $mail->timeout = $this->config->get('config_smtp_timeout');
                $mail->setTo($this->config->get('config_email'));
                $mail->setFrom($this->config->get('config_email'));
                $mail->setSender($this->config->get('config_name'));
                $mail->setSubject("One of the customers has just added a new address");
                $mail->setText($text);
                $mail->send();
to catalog/model/account/addess (in the insert method) but I get an error on the $mail->send(); (the page executes if i comment that line).

Any clue?
Thanks
Last edited by angelo on Fri Feb 03, 2012 10:15 pm, edited 1 time in total.

New member

Posts

Joined
Tue Dec 06, 2011 8:23 pm

Post by angelo » Fri Feb 03, 2012 8:52 pm

Taking a look at this:
http://forum.opencart.com/viewtopic.php?f=20&t=37588
it seems that adding the Mail code is enough to do the trick... now, why my $mail->send(); generate an error???

P.S. All other notifications work!!!

New member

Posts

Joined
Tue Dec 06, 2011 8:23 pm

Post by angelo » Fri Feb 03, 2012 10:14 pm

Don't mind... there where few errors and I always forget the error log feature!!!

Thanks anyway

New member

Posts

Joined
Tue Dec 06, 2011 8:23 pm
Who is online

Users browsing this forum: No registered users and 330 guests