..:: Maya Mail ::..

62 views
Skip to first unread message

Achayan

unread,
Feb 20, 2009, 6:33:21 AM2/20/09
to python_inside_maya
Hi Guys

I just done a new python script for Maya .. send mails from Maya .

There is 3 options

1 : You can compose normal mail inside Maya and you can send to others

2 : If you want to send your details to someone there is option

3 : You can setup your mail server details

Other Features :

You can load a CVS formatted contact list to script and it can give
all the
contacts .

You can download from there as py file

http://achayan-s.blogspot.com/2009/02/maya-mail.html

PS : This just a first version ... so if you have any bugs please send
a comment
And feel free to modify

jasonosipa

unread,
Feb 21, 2009, 12:34:22 AM2/21/09
to python_inside_maya
Looks really cool, and is informative - something I've wanted to get a
handle on for a while is email sent directly from Maya for better user
support. Building up an error log alongside errors themselves,
sending history contents, etc, allowing people to just have a "help
beacon" that takes care of that all and stuffs it into an email, so
they don't need to be super savvy in how they communicate the scene
state, is a very attractive idea to me.

I had problems, though, trying to use a gmail account with this. I'm
not sure, but I think it may have to do with gmail requiring TLS (SSL)

Check out GMail's "standard instructions" here:
http://mail.google.com/support/bin/answer.py?hl=en&answer=13287

And my errors:
# Error: (421, 'Cannot connect to SMTP server 209.85.199.109
(209.85.199.109:25), connect error 10060')
# Traceback (most recent call last):
# File "C:\<snip>\sendInfoMail.py", line 170, in callOfficeMail
# self.sendUsermail
(getrecevier,getsubject,getBody,getServer,getServerPort,currentUserId,getpassWord,getAttachment)
# File "C:\<snip>\sendInfoMail.py", line 211, in sendUsermail
# smtp = smtplib.SMTP(smtpServer)
# File "C:\<snip>\smtplib.py", line 246, in __init__
# raise SMTPConnectError(code, msg)
# SMTPConnectError: (421, 'Cannot connect to SMTP server
209.85.199.109 (209.85.199.109:25), connect error 10060') #

I used smtp server : smtp.gmail.com, tried both smtp ports : 465 &
587, used a valid user/pass, and un-commented line 213 as described
inside the script, but still, it is a no-go.

kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!

unread,
Feb 21, 2009, 2:02:27 AM2/21/09
to python_in...@googlegroups.com
Hi Jas

I forgot to tell about this

in script you can find

#if your using a auth based server please enable next line else leave it as commented
#smtp.login(smtpServer,smtpPort)

i commented this for our purpose coz we are not using a auth session .. so you should uncomment this line
i hope this will work

:)
--
സ്നേഹിക്കയില്ല ഞാന്‍
നോവുമാത്മാവിനെ സ്നേഹിച്ചിടാത്തൊരു
തത്വശാസ്ത്രത്തെയും

jason...@gmail.com

unread,
Feb 21, 2009, 2:05:49 AM2/21/09
to python_in...@googlegroups.com
Hi there!

As I stated towards the end, I tried that, and it still didn't work. :(


From: kurian os ™ ®കോപ്പിയടിച്ചാ ല്©ഗോതമ്പുണ്ട!
Date: Sat, 21 Feb 2009 02:02:27 -0500
To: <python_in...@googlegroups.com>
Subject: [Maya-Python Club:1770] Re: ..:: Maya Mail ::..

jason...@gmail.com

unread,
Feb 21, 2009, 2:07:31 AM2/21/09
to python_in...@googlegroups.com
Hi there! As I stated towards the end of my message, I tried that, and it still didn't work. :(


From: kurian os ™ ®കോപ്പിയടിച്ചാ ല്©ഗോതമ്പുണ്ട!
Date: Sat, 21 Feb 2009 02:02:27 -0500
To: <python_in...@googlegroups.com>
Subject: [Maya-Python Club:1770] Re: ..:: Maya Mail ::..

kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!

unread,
Feb 21, 2009, 12:36:28 PM2/21/09
to python_in...@googlegroups.com
Sad :(

i am getting a error with any smtp server using ssl :(

# Error: 'module' object has no attribute 'ssl'

# Traceback (most recent call last):
#   File "D://Kurian//python//SENDIN~1.PY", line 170, in callOfficeMail
#     self.mail("kuri...@gmail.com","Hello from python!","This is a email sent with python")
#   File "D://Kurian//python//SENDIN~1.PY", line 303, in mail
#     mailServer.starttls()
#   File "C:\Program Files (x86)\Autodesk\Maya2008\bin\python25.zip\smtplib.py", line 605, in starttls
#     sslobj = socket.ssl(self.sock, keyfile, certfile)
# AttributeError: 'module' object has no attribute 'ssl' #

if i am using python its working fine , but when i use maya smtplib its throwing error :(
anyone knows how we can use python smtplib inside maya instead of C:\Program Files (x86)\Autodesk\Maya2008\bin\python25.zip\smtplib.py


kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!

unread,
Feb 21, 2009, 12:57:18 PM2/21/09
to python_in...@googlegroups.com
Hi All

sorry for making torubles .. and i fond a solution we need to copy
_ssl.lib file from C:\Python25\libs and paste to C:\Program Files (x86)\Autodesk\Maya2008\Python\lib

and _ssl.pyd from C:\Python25\DLLs to C:\Program Files (x86)\Autodesk\Maya2008\Python\DLLs

Here with this message i attached a new source code as zip format

if your using a authentication mail sever please un comment this lines


      #if your using a auth based server please enable next line else leave it as commented
      #smtp.ehlo()
      #smtp.starttls()
      #smtp.ehlo()
      #smtp.login(username,userPass)

And JAS a big thanks to you :)


Thanks

Kurian


2009/2/21 kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട! <kuri...@gmail.com>
sceneMail.zip

kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!

unread,
Feb 21, 2009, 1:06:00 PM2/21/09
to python_in...@googlegroups.com
OMG God wrong attachment :(

Here is the new one
sceneMail.rar

kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!

unread,
Feb 21, 2009, 1:19:06 PM2/21/09
to python_in...@googlegroups.com
Again there is a small update in script :D
Dont hit me :D

anyway this is a fine version :)
sceneMail.zip

ryant

unread,
Feb 22, 2009, 3:51:25 AM2/22/09
to python_inside_maya
Hey Jason,

I posted a blog on e-mailing in maya awhile ago and received a e-mail
from someone trying to get it to work with gmail. I gave it another
try and got it to work.

http://www.rtrowbridge.com/blog/2008/12/03/maya-python-email-module/

If you are sending an e-mail with g-mail send it like this:

pyMail( serverURL = 'smtp.gmail.com',
sender = 'mym...@gmail.com',
to = 'som...@somewhere.com',
subject = 'hello',
text = 'world',
user = 'mym...@gmail.com',
password = 'password')

mymail in sender and user should be the same gmail account you are
sending from. You dont need to specify a port in fact I found if you
even specify the port they tell you to which is 465 or 587 it would
hang. Just let the mail client give the script the correct port
automatically.

RyanT
Technical Artist
www.rtrowbridge.com/blog
Naughty Dog Inc.



On Feb 20, 11:07 pm, jason.os...@gmail.com wrote:
>  Hi there!  As I stated towards the end of my message, I tried that, and it still didn't work. :(
>
> -----Original Message-----
> From: kurian os ™ ®കോപ്പിയടിച്ചാ ല്©ഗോതമ്പുണ്ട! <kuria...@gmail.com>
>
> Date: Sat, 21 Feb 2009 02:02:27
> To: <python_in...@googlegroups.com>
> Subject: [Maya-Python Club:1770] Re: ..:: Maya Mail ::..
>
> Hi Jas
>
> I forgot to tell about this
>
> in script you can find
>
> #if your using a auth based server please enable next line else leave it as
> commented
> #smtp.login(smtpServer,smtpPort)
>
> i commented this for our purpose coz we are not using a auth session .. so
> you should uncomment this line
> i hope this will work
>
> :)
>
Reply all
Reply to author
Forward
0 new messages