Email with python scripting

Good day! I am looking at using the python script for email. This is what I am looking at doing:

recipients = 'matt.johnson@shawinc.com'
From = 'me'
system.net.sendEmail("mail.shawinc.com:25", "Internal_Messaging_System_Plant_81@shawinc.com", From, 0, recipients)

I get the error:

I have done this scripting before and it worked in another project using the same line of code. Any pointers for me?

I'd be very interested to see this working code in another project. Your arguments are out of order. Try this..

recipients = ["matt.johnson@shawinc.com"]
From = "myemail@domain.com"
system.net.sendEmail("mail.shawinc.com:25", From, "my subject", "my body text", 0, recipients)
1 Like

Hey, thanks! When I was editing the items to send I got the items out of order. Thanks again!

You should probably redact your email address... you don't want spambots finding it and sending you advertisements about enlarging your body parts or from Nigerian princes wanting to send you their inheritance. Incidentally, I've never once received the inheritance they've promised me :confused:

4 Likes

Should we deduce from the lack of infirmation/confirmation on this topic that the body parts did indeed get bigger ?

5 Likes

They did indeed! :wink: My right leg is now twice the size of the left! But my doctor calls it elephantiasis :roll_eyes:* rolls eyes * he's just jealous

6 Likes