ScriptSpot

Script

MaxMail

By jos · 2012-06-17

Version
0.3
Date updated
2017-02-25
Votes
2
Description

I'm working on a mailscript in my spare time.
I have figured out how to send mail
This is not yet with a ui, but this is a function you can use in your scripts. This is written with dotnet and maxscript.

Here you can find my tutorial "Send mail with attachment (maxscript)

What do you need?
gmail, hotmail or other mailadress (works with a systray or telenet for example). But you can also send with a default adress. So you dont even need a mailadress!

How it works?
use this script with fileIn() or just run it and type one of the examples in the listener

example 1 : use default adress

 MaxMail ToAdress:"wathever@wathever.wathever" 


 MaxMail ToAdress:"wathever@wathever.wathever" Subject:"MaxMail" Text:"Message" 

example 2 : use your own gmail 

 MaxMail FromAdress:"example@gmail.com" Password:"xxx" ToAdress:"wathever@wathever.wathever" Subject:"MaxMail" Text:"Message" 

example 3 : add an attachment

 MaxMail ToAdress:"wathever@wathever.wathever" AttachFile:"C:Users/Jos/Desktop/test.txt" 

 

 MaxMail ToAdress:"wathever@wathever.wathever" AttachFile:#("C:Users/Jos/Desktop/test.txt","C:Users/Jos/Desktop/test.txt") 

 

 

Additional Info

update 2012/06/18 : you can add an attachment! tested on max 2012 64bit works on max 09 - ... update 2017/02/25 : Added support for Yahoo mail
Attachments

Tags: attach, Gmail, mail, hotmail, send, attachment

Comments (10)

e_samurai · 2016-10-10

I'm really sorry for the noob question but I'm completely new to scripting. I ran the .mse and installed the script. Then when I type a line in the listener it says

"MaxMail: Gmail parameter are not correct"
false

please advise me what to do! Thanks a lot!

jos · 2017-02-25

Would be great if you could share that line you've typed in the listener.. Usually the printed error means the credentials are wrong. Sorry for the late reply!

fajar · 2012-06-18

wow it works on max 9 too, thanks jos, but I wonder if it can attach some file too...say after render I want to send it to someone.

Thanks

great

jos · 2012-06-18

That's great :) thanks for trying it out! Yes that would be nice.I Have no idea if that's possible, but I'll search if there's a way!

jos · 2012-06-18

found the way to add an attachment. I'll soon add an update!

Michele71 · 2012-06-18

Great and fun script :) Thanks!!!

fajar · 2012-06-18

interestiing , althoug I tried and still get it not work for me, am i wrong in procedure ?


filein "D:\\maxmail.mse"
function MaxMail FromAdress:"MyMail@gmail.com" Username:"MyName" Password:"myPass" ToAdress:"MySentTo@gmail.com" Subject:"MaxMail" Text:"Mail from maxscript"

is that wrong ?

*sorry : I change the pass, and username when I post it here.for my security reason.

jos · 2012-06-18

For gmail you dont have to give your username. just leave that emty. (Actually the username is the same as your mail.) this should work


MaxMail FromAdress:"MyMail@gmail.com" Password:"myPass" ToAdress:"MySentTo@gmail.com" Subject:"MaxMail" Text:"Mail from maxscript"

hope that helps. keep me updated!

Martin Breidt · 2012-06-18

Looks like an interesting function but do you really expect anyone to submit login/password combinations to an encrypted script?

jos · 2012-06-18

havent thought about that one. I'm not intrested in your login/password but I understand your point. You can send mail with a adress I have made for this function. (It contains login/password for this default adress, thats the reason why I have it encrypted).. I will add a nonencrypted version without default adress later. So for now you can just use this function with

MaxMail ToAdress:"wathever@wathever.wathever" Subject:"MaxMail" Text:"Message"