Print Page | Close Window

E-mail send problem

Printed From: Web Wiz Forums
Category: Web Wiz Hosting Services Forums
Forum Name: Web Wiz Hosting Support Forums
Forum Description: Support forum for Web Wiz Hosting services and solutions.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29226
Printed Date: 28 March 2026 at 7:39am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: E-mail send problem
Posted By: NeilHutch
Subject: E-mail send problem
Date 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




Replies:
Posted By: WebWiz-Bruce
Date 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>");
  }
 ?>


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: NeilHutch
Date Posted: 01 April 2011 at 3:35pm
Many thanks for that Bruce



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net