Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Zenoss issue http://www.zenoss.org/forum/2106
- garaj@zenossmaster:~$ sudo su - zenoss
- -bash-3.2$ whoami
- zenoss
- -bash-3.2$ nslookup smtp.gmail.com
- Server: 127.0.0.1
- Address: 127.0.0.1#53
- Non-authoritative answer:
- smtp.gmail.com canonical name = gmail-smtp-msa.l.google.com.
- Name: gmail-smtp-msa.l.google.com
- Address: 173.194.66.109
- Name: gmail-smtp-msa.l.google.com
- Address: 173.194.66.108
- -bash-3.2$ python
- Python 2.7.2 (default, Dec 20 2011, 15:24:39)
- [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import Globals
- >>> from Products.ZenUtils.Utils import sendEmail
- >>> from email.Utils import formatdate
- >>> email_message = {}
- >>> email_message['Subject'] = 'subject'
- >>> email_message['From'] = '<from_email>'
- >>> email_message['To'] = '<[email protected]>'
- >>> email_message['Date'] = formatdate(None, True)
- >>> result, errorMsg = sendEmail(email_message, 'smtp.gmail.com', '587', True, '[email protected]', <password>)
- >>> print 'Result: %s - errMsg: %s' % (result, errorMsg)
- >>> import socket
- >>> socket.getaddrinfo( 'smtp.gmail.com', 587)
- [(2, 1, 6, '', ('173.194.67.108', 587)), (2, 2, 17, '', ('173.194.67.108', 587)), (2, 3, 0, '', ('173.194.67.108', 587)), (2, 1, 6, '', ('173.194.67.109', 587)), (2, 2, 17, '', ('173.194.67.109', 587)), (2, 3, 0, '', ('173.194.67.109', 587)), (10, 1, 6, '', ('2a00:1450:400c:c05::6c', 587, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c05::6c', 587, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c05::6c', 587, 0, 0))]
Add Comment
Please, Sign In to add comment