Link to home
Start Free TrialLog in
Avatar of stkoontz
stkoontzFlag for United States of America

asked on

Linux Webhost Recommendation

I'm currently using Bluehost for several websites.  There's a registration application I'm building that requires sending email to an offsite domain.  I checked Bluehost's help file and found that "BlueHost.com will only send messages to an email address setup on your Bluehost account. If you wish to deliver the email elsewhere, you may setup an email forwarder instead."

The email forwarder won't work because the email has to go to the person filling out the registration form.

Has anyone had experience with a webhost they're satisfied with?  My requirements are...

Linux
Runs WordPress well
Sending form mail offsite
Good tech support

Steve
Avatar of Gary
Gary
Flag of Ireland image

They won't let you send an email to someone, are you sure you're not confusing this with the From address i.e. the From must be your own registered email.
A hosting provider wouldn't last very long if they didn't let you send email.

As an afterthought maybe they are talking about trying to use a different email server from their own.
Erm use a mail relay server, I'm thinking your webhoster has a smtp.webhost.com mx address? And if you are sending mail from your registered account it allows you to send as you@webhost.com? Then you should be able to replicate what your mail client does "authenticate/send"

Saw these for your webhoster

Non-authoritative answer:
bluehost.com    MX preference = 300, mail exchanger = bluehost.com.s7b1.psmtp.co
m
bluehost.com    MX preference = 200, mail exchanger = bluehost.com.s7a2.psmtp.co
m
bluehost.com    MX preference = 100, mail exchanger = bluehost.com.s7a1.psmtp.co
m
bluehost.com    MX preference = 400, mail exchanger = bluehost.com.s7b2.psmtp.co
m
Avatar of stkoontz

ASKER

It's not just sending an email to someone.  It's using an application like PHPmailer to automatically send an email when someone fills out an online form.

I've seen recommendations for Bluehost in Experts-Exchange, so maybe there's a workaround that someone can suggest that the Bluehost tech support wouldn't suggest.

Steve
In PHPmailer are you trying to use localhost? Set the server config up to use the Bluehost mail server
SOLUTION
Avatar of dipopo
dipopo
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would hash your password in the script though! you never know.
How do I 'hash' my password?

Thanks for the great help.  I'm working through dipopo's link now.
The reason they use a relay server is that most of Bluehosts IP's are seen as spam relays and most mail servers block them and it lets them control outgoing email. ditto for GoDaddy.
Hmm seems it would require extra to use hash password for your authentication thinking about it, use open password, at least you receive sent items in your inbox by using your email account instead of a non-valid mail account.
I ran dipop's example code and I'm getting this error when I try to send to an account that's not on my Bluehost domain.  (When I send to an account that is on my Bluehost domain, I get the message "Message has been sent.")


Message could not be sent.

Mailer Error: SMTP Error: The following recipients failed: steve@*******.org

SMTP server error: Verification failed for 550-No Such User Here 550 Sender verify failed
Did you add in your email account credentials (the one you are sending from) - email (or username) and password
Yes
Are you sure you are using the correct format for the username, some mail servers use the first part of the email address (upto @) and some use the whole email address
Otherwise maybe this
https://my.bluehost.com/cgi/help/469
Yes,  the format is correct.  Otherwise it wouldn't work when I try to send to an email account on our Bluehost plan.

The link you suggested just deals with sending email from an email client, not formmail email.

Bluehost is down now, so I won't be able to do any more testing until it comes back up.

Steve
Can you post this section of your config

-Edit out the real details of-course-

$mail->IsSMTP();                                      // set mailer to use SMTP
$mail->Host = "smtp1.example.com;smtp2.example.com";  // specify main and backup server
$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->Username = "jswan";  // SMTP username
$mail->Password = "secret"; // SMTP password

$mail->From = "from@example.com";
$mail->FromName = "Mailer";
$mail->AddAddress("josh@example.net", "Josh Adams");
$mail->AddAddress("ellen@example.com");                  // name is optional
$mail->AddReplyTo("info@example.com", "Information");
Here it is.  Thanks for the quick responses.  I appreciate the help.


$mail->IsSMTP();
$mail->Host = "localhost";  // specify main and backup server
$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->Username = "username@domain.com";  // SMTP username
$mail->Password = "password"; // SMTP password

$mail->From = "frommail@domain.com";
$mail->AddAddress("sendto@domain.com");
$mail->WordWrap = 50;
$mail->IsHTML(true);

$mail->Subject = "You have received feedback from your website!";
$mail->Body    = $message;
$mail->AltBody = $message;

if(!$mail->Send())
{
   echo "Message could not be sent. <p>";
   echo "Mailer Error: " . $mail->ErrorInfo;
   exit;
}

echo "Message has been sent";
?>
Wrong
$mail->Host = "localhost";

Must be Bluehosts mail server
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Very nice indeed! So is it all working now?
It's working, but I won't be able to send to my primary domain until I move the domain to Bluehost.

Thanks for all the help!
I gave the points to Dipopo because the link he left here (http://www.inmotionhosting.com/support/email/send-email-from-a-page/using-phpmailer-to-send-mail-through-php) helped put me on the path to the solution.  I posted the root cause of the problem (marked 'best solution') for others who come across this question.