[support] backup migrate - no email
Joe CodeWaggle
joe at codewaggle.com
Tue Aug 10 15:29:09 UTC 2010
Did you try sending it without the mime portion?:
mail("prefix at domain.net", "Test Email", "Test Body");
This pares it down to the basics (address message should be sent to,
Subject, message text).
If you get the error using that format it's beyond me, but I expect that the
error is being caused by something in the mime portion. If the simple
version above works without error, add the mime portion back:
mail("prefix at domain.net", "Test Email", "Test Body", $mime);
Then comment out the lines that are adding to the $mime string. For example,
put comment slashes in front of the "if" statements:
//if (!empty($this->from)) $mime .= "From: ". $this->from ."\n";
//if (!empty($this->headers)) $mime .= $this->headers ."\n";
//if (!empty($this->body)) $this->add_attachment($this->body, "",
"text/plain");
If the error goes away, remove the slashes from one line at a time until you
see which one causes the error to occur.
Keep in mind that there's a possibility that multiple lines could contribute
to the problem.
Joe
*********function send() {
$mime = "";
if (!empty($this->from)) $mime .= "From: ". $this->from ."\n";
if (!empty($this->headers)) $mime .= $this->headers ."\n";
if (!empty($this->body)) $this->add_attachment($this->body, "",
"text/plain");
$mime .= "MIME-Version: 1.0\n". $this->build_multipart();
mail($this->to, $this->subject, "", $mime);
}***********
-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Jo (Drupal Acct)
Sent: Monday, August 09, 2010 7:51 AM
To: support at drupal.org
Subject: Re: [support] backup migrate - no email
Ok on from this, the email does arrive using the code in the inc file,
my concern is the warning message, as i dont really like having
unecessary warnings cluttering up my install.
My tech guys are saying
"What it normally means is that the PHP:Mail function has been sent more
information than it requires and was unable to process all of it."
any ideas how to proceed?
TIA
On 04/08/2010 23:50, Joe CodeWaggle wrote:
> I haven't worked with backup migrate, but as a troubleshooting step you
> could temporarily hard code the variables.
> Make a copy of the function send() code block and comment it out, so you
> have the correct code to put back when you finish.
>
> Change this:
> mail($this->to, $this->subject, "", $mime);
>
> To this:
> mail("prefix at domain.net", "Test Email", "Test Body");
> (I removed the 4th parameter)
>
> If it still doesn't work, you need to look into your mail configuration.
>
> -------------------------------------
>
> If the email is sent, work your way back through the parameters until you
> find the one that's causing the problem.
> mail("prefix at domain.net", "Test Email", "");
>
> Still works? Try this:
> mail("prefix at domain.net", $this->subject, "");
>
> Still works? Try this:
> mail($this->to, $this->subject, "");
>
> Still works? Try this:
> mail($this->to, $this->subject, "", $mime);
>
> When one fails follow it back into the prior code and try the same
process.
>
> Good Luck,
> Joe
>
>
> -----Original Message-----
> From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
> Behalf Of Jo (Drupal Acct)
> Sent: Wednesday, August 04, 2010 7:15 AM
> To: support at drupal.org
> Subject: [support] backup migrate - no email
>
> Hi
>
> I am using the backup migrate tool to backup my database, however i get
> the following error
>
> ********warning: mail() [function.mail]: Bad parameters to mail()
> function, mail not sent. in
>
/home/hsphere/local/home/xxxx/xxxx.net/modules/backup_migrate/includes/desti
> nations.email.inc
> on line 139. **********
>
> so i go the inc file and find the following
>
> *********function send() {
> $mime = "";
> if (!empty($this->from)) $mime .= "From: ". $this->from ."\n";
> if (!empty($this->headers)) $mime .= $this->headers ."\n";
> if (!empty($this->body)) $this->add_attachment($this->body, "",
> "text/plain");
> $mime .= "MIME-Version: 1.0\n". $this->build_multipart();
> mail($this->to, $this->subject, "", $mime);
> }***********
>
> can anyone help me with what i need to change to get an email to
> prefix at domain.net
>
> Thanks in advance
> Jo
--
[ Drupal support list | http://lists.drupal.org/ ]
More information about the support
mailing list