groupwise send mail

E

ericoneal

Can someone give me an idea as to why this is not working? The
Recipients.Add line doesnt cause an error, but my recipients arent
being used. The email never gets sent because there is no recipeients.

Thanks,
Eric


import win32com.client
gwApp = win32com.client.Dispatch('NovellGroupWareSession')
acct1 = gwApp.Login("NDS:\\Tree_Name","user.context", "")
oMail = acct1.MailBox.Messages.Add ("GW.Message.Mail", "Draft")
oMail.fromtext = "Python Hazmat Script"
oMail.Recipients.Add("(e-mail address removed)")
oMail.Subject.PlainText = "Script error"
oMail.BodyText.PlainText = "The Python Hazmat script failed"
oMail.send
gwApp.quit
 
M

Max M

Can someone give me an idea as to why this is not working? The
Recipients.Add line doesnt cause an error, but my recipients arent
being used. The email never gets sent because there is no recipeients.

Thanks,
Eric


import win32com.client
gwApp = win32com.client.Dispatch('NovellGroupWareSession')
acct1 = gwApp.Login("NDS:\\Tree_Name","user.context", "")
oMail = acct1.MailBox.Messages.Add ("GW.Message.Mail", "Draft")
oMail.fromtext = "Python Hazmat Script"
oMail.Recipients.Add("(e-mail address removed)")
oMail.Subject.PlainText = "Script error"
oMail.BodyText.PlainText = "The Python Hazmat script failed"
oMail.send
gwApp.quit

Methods must allways have a () in Python to be called
> oMail.send()
> gwApp.quit()


Otherwise you are just adressing the objects

eg. this is perfectly ok:

send = oMail.send
send()

or

q = gwApp.quit
q()

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top