21294 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 324 Views |
-
Why does not work the class Email in a WAMP server?

10 February 2012 at 9:31am Last edited: 10 February 2012 9:31am
Hi!
The mail function works perfectly on the WAMP server, but the Email class does not send the message.
What is happening?
Do I have to setup something more in the Email class?The same code, in a server remote works perfectly.
Regards,
Jose A.php.ini (WAMP server)
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = mail.dominiox.com
; http://php.net/smtp-port
smtp_port = 25public function sendemail($data, $form){
if(!empty($this->Mailto)){
$email = $this->Mailto;
} else {
$email = EMAIL;
}$headers = 'MIME-Version: 1.0'. "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: sender@sender.com' . "\r\n";
mail("info@dominiox.com","test subject","test body",$headers);$from = $data['Email'];
$to = $email;
$subject = $this->subject;
$email = new Email($from, $to, $subject);
$email->setTemplate('Email');
$email->populateTemplate($data);
$email->send();Director::redirect($this->Link('sent'));
} -
Re: Why does not work the class Email in a WAMP server?

13 February 2012 at 9:57pm
Hi!
Does anyone have any ideas about this?
Regards,
Jose A. -
Re: Why does not work the class Email in a WAMP server?

13 February 2012 at 10:53pm
As I recall I used soemthing like this...
http://www.joshstauffer.com/send-test-emails-with-wampserver/Now I don't, instead I have a debug log (in the db) and when on localhost send all email there... there were some emails sent that I didn't want to be.
-
Re: Why does not work the class Email in a WAMP server?

14 February 2012 at 1:49am
swaiba, you are wonderful.
Your solution works perfectly.Thank you very much.
Regards,
Jose A.
| 324 Views | ||
|
Page:
1
|
Go to Top |


