Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - E-mail send problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

E-mail send problem

 Post Reply Post Reply
Author
NeilHutch View Drop Down
Newbie
Newbie
Avatar

Joined: 28 July 2010
Location: Parkstone
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote NeilHutch Quote  Post ReplyReply Direct Link To This Post Topic: E-mail send problem
    Posted: 01 April 2011 at 12:47pm
Hi,
I am trying to get a third party shopping cart working but I keep getting the error-

Error: mail(): SMTP server response: 550 < No such user here
File: C:\HostingSpaces\Wedding Daze\studio-time.co.uk\wwwroot\proofbuddy-2-0-4\admin\class.phpmailer.php:477

The email that it is sent to is one that I have set up in my control panel. The cart is php, is it necessary to use Pear Mail to authenticate if so will I have to get the developer to customise the cart for it to work?

Thanks in advance

Neil Hutch

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2011 at 1:20pm
You would need to use PHP Pear as the mail servers require authentication to prevent abuse by spammers and email spoofing.

It should be fairly simply to change the code below is sample PHP Pear code:-

<?php
 require_once "Mail.php";
 
 $from = "website <me@example.com>";
 $to = "Me <you@your-domain.com>";
 $subject = "Hi!";
 $body = "Hi,\n\nTest from my website";
 
 $host = "mail.websitelive.net";
 $username = "me@example.com";
 $password = "my-password-here";
 
 $headers = array ('From' => $from,
   'To' => $to,
   'Subject' => $subject);
 $smtp = Mail::factory('smtp',
   array ('host' => $host,
     'auth' => true,
     'username' => $username,
     'password' => $password));
 
 $mail = $smtp->send($to, $headers, $body);
 
 if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");
  } else {
   echo("<p>Message successfully sent!</p>");
  }
 ?>
Back to Top
NeilHutch View Drop Down
Newbie
Newbie
Avatar

Joined: 28 July 2010
Location: Parkstone
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote NeilHutch Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2011 at 3:35pm
Many thanks for that Bruce
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.