- Access the osCommerce administrative panel. The URL should be similar to http://yourdomain.com/admin.
- Go to Configuration > Email Options.
- Choose “SMTP” as the Transport Method.
|
1
2
3
4
5
6 |
if (EMAIL_TRANSPORT == 'smtp') {return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $$} else {return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this$}} |
|
1
2
3
4
5
6 |
if (EMAIL_TRANSPORT == 'smtp') {// return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $$// } else {// return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this$// }// } |
|
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18 |
require_once(DIR_WS_CLASSES . "class.phpmailer.php");$pMail = new PHPMailer();$pMail->From = $from_addr;$pMail->FromName = $from_name;$pMail->IsSMTP();$pMail->Host = "mail.yourdomain.com"; // replace with your SMTP server$pMail->Username = "account@yourdomain.com"; // replace with your SMTP username$pMail->Password = "password"; // replace with your SMTP password$pMail->SMTPAuth = true; // SMTP authentication must be always turned on (true)$pMail->Subject = $subject;$pMail->Body = $this->output;$pMail->AddAddress($to_addr, $to_name);$pMail->IsHTML(false);return $pMail->Send();$pMail->ClearAddresses();$pMail->ClearAttachments();}} |
No comments:
Post a Comment