I have a form on my website that emails my account, but
Google Apps for Administrators
> If you have a form (using PHP/ASP/etc) on your website that is configured to send a message to your Google Apps email account, but you never receive mail from your website's form, please perform the following tests:
Send a message to your Google Apps email account from a non-Google Apps personal email account.
Modify the form to send mail to your Gmail account, or another non-Google Apps personal email account.
If both tests are successful, this issue is most likely caused by mail delivery settings on your webserver. Because your website and your Google Apps email address share the same domain name, the mail agent running on the server that hosts your website thinks that it is responsible for mail addressed to your domain name. This is a typical default setting.
When someone submits the form on your website, the mail agent recognizes your domain name and concludes that it should be sending mail to itself. The mail agent will attempt to deliver the message locally.
To resolve this issue, notify the mail agent running on the server that hosts your website that it is not also responsible for handling mail for your domain. Contact your web host for specific instructions. If you host your own website, contact the support team for your mail server software.
I have this Problem can anyone please suggest a sol? I am using smpt server.
3 Replies
James
# email out
fromaddr = ""
if self.CONNECTION.args.has_key('ADDRESS'):
fromaddr = self.CONNECTION.args['ADDRESS']
if fromaddr == "":
fromaddr = "zunzun@zunzun.com"
toaddrs = ["zunzun@zunzun.com"]
# Add the From: and To: headers at the start!
msg = ("From: %s\r\nTo: %s\r\nSubject: ZunZun.com Feedback Form\r\n\r\n"
% (fromaddr, string.join(toaddrs, ", ")))
msg += "From " + fromaddr + "\n\n"
msg += dateAndTime + "\n\n"
msg += self.CONNECTION.args['FEEDBACK']
server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.ehlo()
server.login('zunzun@zunzun.com', 'PASSWORD_GOES_HERE')
server.sendmail(fromaddr, toaddrs, msg)
server.quit()