Here is my stand alone code named "testMail.py" # Import smtplib for the actual sending function import smtplib
# Import the email modules we'll need from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart me = 'no-reply@mydomain' you = 'reciver mail address' msg = MIMEMultipart('alternative') msg['Subject'] = "Link" msg['From'] = me msg['To'] = you # Open a plain text file for reading. For this example, assume that # the text file contains only ASCII characters. #fp = open(textfile, 'rb') # Create a text/plain message msg = MIMEText("321") #fp.close() # me == the sender's email address # you == the recipient's email address msg['Subject'] = 'The contents of' msg['From'] = me msg['To'] = you # Send the message via our own SMTP server, but don't include the # envelope header. s = smtplib.SMTP('localhost') s.sendmail(me, [you], msg.as_string()) s.quit() and I use *#python testMail.py *in ubuntu log shows relay use IPv4 to=<reciver mail address(Gmail)>, relay=gmail-smtp-in.l.google.com[ *74.125.200.27*]:25, delay=1.1, delays=0.01/0.01/0.34/0.69, dsn=2.0.0, status=sent (250 2.0.0 OK 1458651060 fa5si6934045pab.209 - gsmtp) *relay=gmail-smtp-in.l.google.com[74.125.200.27]:25* but when I use web2py it use IPv6 live above post to=<reciver mail address(Gmail)>, relay=gmail-smtp-in.l.google.com[2404:6800:4003:c02::1a]:25, delay=1.4, delays=0.01/0.01/0.53/0.9, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2404:6800:4003:c02::1a] said: 550-5.7.1 [2400:8901::f03c:91ff:fee4:d079] Our system has detected that this 550-5.7.1 message does not meet IPv6 sending guidelines regarding PTR records 550-5.7.1 and authentication. Please review 550-5.7.1 https://support.google.com/mail/?p=ipv6_authentication_error for more 550 5.7.1 information. q3si14753805iga.101 - gsmtp (in reply to end of DATA command)) *relay=gmail-smtp-in.l.google.com[2404:6800:4003:c02::1a]:25* I think this is the point? but I don't know how to change or fix it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.