I am using Webform 6.x-2.1.2. Itʻs working great when the "E-mail to address:" is on my drupal domain. But if I am sending to an external addresses like gmail or hotmail, the email is not received.
Also, if I have my drupal domain email set to forward to gmail, the webform submission is received on the domain but not forwarded to gmail.
Is the webform supposed to be able to send to an external email address? What can I do to get it working?
Thanks,
Andy
Comments
Comment #1
quicksketchWebform doesn't use any special e-mail mechanisms outside of the way Drupal normally handles e-mail. The problem probably exists for all e-mails sent by your Drupal installation. Try using the "Request new password" to send an e-mail to your gMail account to test if Drupal can send any external e-mail at all.
Comment #2
taropatch commentedI tested and it appears that Drupal cannot send to any external email addresses. The server I am on has "nobody" email disabled or something.
I tried searching and reading a bunch of stuff but I am not sure what the best thing to do is. Any suggestions? I saw a return-path module but it is not supported for 6.x.
Comment #3
ericprk commentedMy hosting company doesn't allow email to external addresses unless the "from" email address is from the domain name used for my site. If your using an outside hosting company you might check for something similar.
You could still use gmail as your email client.
Comment #4
taropatch commentedThe "from" email is from my domain but in the header, the "sender" is nobody. I am still not sure what is the best way to fix this. I'm on a shared server so do not have access to php.ini. Do I use -f and create a php.ini in my root directory?
Comment #5
taropatch commentedAdding the below line in mail.inc made progress. The return-path and "envelope-from" is now correct, but the "Sender:" in the header is still "nobody". I am not sure what to try next?!?!
return mail(
$message['to'],
mime_header_encode($message['subject']),
// Note: e-mail uses CRLF for line-endings, but PHP's API requires LF.
// They will appear correctly in the actual e-mail that is sent.
str_replace("\r", '', $message['body']),
// For headers, PHP's API suggests that we use CRLF normally,
// but some MTAs incorrecly replace LF with CRLF. See #234403.
join("\n", $mimeheaders),
'-femail@mydomain.com' <---- ADDED THIS LINE
);
}
}
Comment #6
taropatch commentedUnfortunately, I never did figure this out. My work around was to use the smtp module.
Comment #7
taropatch commented