Welcome Guest, Not a member yet? Register   Sign In
sending mail on dreamhost
#1

[eluser]taurine[/eluser]
I have something like this:

Code:
$this->load->library('email');
$this->email->from($_POST['email'], 'myApp');
$this->email->to($_POST['email']);
$this->email->subject('myApp Password Reset');
$this->email->message('Your password has been reset to: '.$new);
$this->email->send();

And I receive the email dreamhost saying it was unable to send.

Code:
This is the mail system at host rogue.dreamhost.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

...

<[email protected]>: host smarty.dreamhost.com[123.123.123.1] said: 554
   5.7.1 <[email protected]>: Recipient address rejected: Policy Rejection-
   --SENDER_QUOTA_REJECTION-- (in reply to RCPT TO command)

Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.7.1
Remote-MTA: dns; smarty.dreamhost.com
Diagnostic-Code: smtp; 554 5.7.1 <[email protected]>: Recipient address
   rejected: Policy Rejection- --SENDER_QUOTA_REJECTION--


---------- Forwarded message ----------
From: "myApp" <[email protected]>
To: [email protected]
Date: Sun, 12 Sep 2010 02:25:38 -0700 (PDT)
Subject: myApp Password Reset
Your password has been reset to: zzzzzz

And this is what my debugger looks like
Code:
User-Agent: CodeIgniter
Date: Sun, 12 Sep 2010 03:19:47 -0700
From: "myApp"
Return-Path:
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
=?utf-8?Q?myApp_Password_Reset?=
Your password has been reset to: zzzzzzzz

Thanks.
#2

[eluser]taurine[/eluser]
I just tried the manual way, and it worked. So either I'm using the CI's email function incorrectly, or there is an incompatibiality with it and dreamhost

Code:
//this works
$to = $_POST['email'];
$subject = "myApp Password Reset";
$message = 'Your password has been reset to: '.$new;
$headers = "From: ".$_POST['email']."\r\n";
$headers .= "Reply-To: ".$_POST['email']."\r\n";
$headers .= "X-Mailer: PHP/".phpversion();
mail("$to", $subject, $message, $headers);
#3

[eluser]taurine[/eluser]
According to Dreamhost's website, it says if the FROM is not correct, it'll give the SENDER_QUOTA_REJECTION message, which was mentioned in the "unable to send" email I received. So perhaps that's what is wrong with the original code. But looking at the code, I don't see it.
#4

[eluser]Maxim7[/eluser]
Hi had the same problem, you have to set a email which you have in your dreamhost, you can't add a random one.. I just set up a email from a domain that i have in dreamhost it works.

more info here :
http://wiki.dreamhost.com/SMTP_quota

Quote:While trying to send mail, if you receive an error message which says "SENDER_QUOTA_REJECTION" that means that you have exceeded, or attempted to exceed your mail sending limit for that particular account. Also, if you attempt to send messages and do not use the correct FROM address the system will also give you this error and will not send your message.




Theme © iAndrew 2016 - Forum software by © MyBB