Send emails with a custom script

Hello

I'm trying to get by email using customscript in FDMEE. I get email during execution of the script. (Blank email). I don't get the message that I give in the script. Here's the script. Can someone let me know what I'm you wish here:

# Import smtplib for the actual sending function

Import smtplib

strSMTPServer = "XXX".

iSMTPPort = 25

strReceivers = "Xxx".

strSender = "Xxx".

#strMessage = 'this is a test e-mail.

strMessage = "" «this is a test e-mail»»»

Try:

#smtpServer = smtplib. SMTP (strSMTPServer, iSMTPPort)

smtpServer = smtplib. SMTP ("XXX", 25)

smtpServer.set_debuglevel (1)

smtpServer.ehlo)

smtpServer.starttls)

#smtpServer.login (strUserid, strPassword)

smtpServer.sendmail (strSender, strReceivers, strMessage)

#SendEmail (strSender, strReceivers, "Test")

Print "sent by e-mail.

smtpServer.quit)

except Exception, e:

Print ' error: cannot send email: "+ str (e).

Thanks in advance

Hello

I think that you do not provide the context of the strmessage correctly.

You can try below

# Import smtplib for the actual sending function
import smtplib
strSMTPServer  = 'XXX'
iSMTPPort = 25
strReceivers = "XXX.com"
strSender = "XXX.com"
#strMessage = "This is a test e-mail message"
strMessage ="""From: [email protected]
To: [email protected]
Subject: SMTP e-mail test

This is a test e-mail message.
"""
try:
    #smtpServer = smtplib.SMTP(strSMTPServer, iSMTPPort)
    smtpServer = smtplib.SMTP("XXX", 25)
    smtpServer.set_debuglevel(1)
    smtpServer.ehlo()
    smtpServer.starttls()
    #smtpServer.login(strUserid, strPassword)
    smtpServer.sendmail(strSender,strReceivers,strMessage)
    #SendEmail(strSender,strReceivers,"Test")
    print "Successfully sent email"
    smtpServer.quit()
except Exception, e:
     print "Error: unable to send email: " + str(e)

Hope this helps

Thank you

N.S.

Tags: Business Intelligence

Similar Questions

  • Cannot send emails with Hotmail today

    Since yesterday, I can't send emails or make the answers with Hotmail. Before that, everything was fine.

    I have the same problem on several Mac and all at the same time. (Mac have different OS_.

    I can however, send emails with Safari without any problem, so there must be something with Firefox.

    Perhaps Microsoft changed something on the Outlook site (I guess when you connect you are redirected to the new site of Outlook). The site behaves as if sitting them buttons are "dead" so that the message is just there, or do you have an error message?

    Have you noticed all the other strange behaviors on your Mac Firefoxes, such as errors in secure certificate?

    Here are a few general suggestions:

    When you have a problem with a particular site, a good "first thing to try" is clear your Firefox cache and delete your cookies for the site.

    (1) delete the Cache of Firefox

    Sometimes, these temporary files mingle with files in a way that breaks a fresh site.

    This article has the steps: How to clear the cache of Firefox

    If you have a large hard drive, this may take a few minutes.

    (2) remove your cookies from live.com (save all pending work first of all if you can). While displaying a page on the site, try either:

    • Right click and select View Page Info > Security > "View Cookies".
    • (menu bar) Tools > Page Info > Security > 'view the Cookies '.
    • Click on the globe or padlock icon in the address bar > additional information > "View Cookies".

    In the dialog box that opens, live.com or mail.live.com should already be filled up. You can delete cookies from the site individually.

    Then try to reload the page and sign in again. Who help me?

    Could test you mode without failure of Firefox? It is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    Does not work if Firefox: Hold down the option key when starting Firefox.

    If Firefox is running: You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    and OK reboot.

    Two scenarios: A small dialog box should appear. Click on 'Start mode safe' (not update).

    Any improvement?

  • How can I send emails with outlook express from firefox

    How can I send emails with outlook express from firefox

    See change the program used to open e-mail links for how to configure Firefox to use Outlook Express.

  • I can't send emails with the server that I use to receive. Can you tell me how to find my server from?

    Help send emails

    I can't send emails with the server that I use to receive. Can you tell me how to find my server going.

    Your provider of messaging service for this information.

  • Cannot send emails with Outlook Express

    original title: I AM NOT ABLE to SEND EMAIL WITH OUTLOOK EXPRESS but CAN RECIEVE I AI PARLEES WITH OPTUS AND CHECXKED all THE SETTINGS AND ARE OK

    I CHECKED WITH OPTUS OUR CARRIER AND WE CANNOT SEND EMAILS VIA OUTLOOK EXPRESS, THEY SEEM TO THINK THAT IT MAY BE A PROBLEM WITH OUTLOOK CAN ONLY HELP PLEASE

    I CHECKED WITH OPTUS OUR CARRIER AND WE CANNOT SEND EMAILS VIA OUTLOOK EXPRESS, THEY SEEM TO THINK THAT IT MAY BE A PROBLEM WITH OUTLOOK CAN ONLY HELP PLEASE

  • Unable to send emails with photos. Msg text is received, but pictures are encrypted. Help, please.

    Whenever I have send email with attachments of photo or photo the receiver responds that, although they could read the text, they were unable to see the photos. It happened all of a sudden for a few days ago. So I'm unable to send postcards because they received are encrypted. Please help - thanks.

    You use Outlook?  If you do not use the RTF format, as then the recipients cannot read your images and attachments.  Either use plain text or HTML format in Outlook messages, but not in the RTF format.

    Steve

  • Someone is sending emails with my windows live address to all my contacts without my permission, spamming other mailboxes with what looks like messages from me.

    Someone is sending emails with my windows live address to all my contacts without my permission, spamming other mailboxes with what looks like messages from me.

    Help with this!

    Apparently, someone broke your Hotmail account. Change your password immediately. For more information, visit these web pages:

    Compromised account - unauthorized account access
    Hotmail hacked? Take these steps
    Hotmail: Tips to help protect your account

    Boulder computer Maven
    Most Microsoft Valuable Professional

  • Cannot send emails with Windows Mail (Vista premium edition)

    I can't send emails with windows mail. I must go to Tiscali for now to do so. I went through the troubleshooting help, but I'm still not able to send an email. I can receive only. Error messages that are raised are - Socket - 10060 and error Error - 0x800CCC0E. Can anyone help.

    PS - my computer skills are always solutions if not complicated a bit basic please. Thanks for any answers to my problem.

    Hello!

    Thanks for the post.

    This isn't the exact error message, PS paste the entire error message, but this does not mean that we have no idea.

    This above error message is perhaps due to Norton, I say Norton because I saw it with Norton. Quite possible that you use another Antivirus/Firewall. Try to disable the firewall/AV & see if this work. Alternatively, try to uninstall the security software & then give it a shot.

    Hope it would help, do not hesitate to come back with the exact error code.

    Anurag Shukla of light
    Microsoft Certified Professional

  • Impossible to send emails with word, pdf, xpsx attachments using windows live mail is revealing as mistake MATI any help out there?

    I use NAWL Widows Live Mail get a mistake MATI when I try to send emails with attachments.

    Hello

    If you are having problems with Windows Live Mail, I suggest you to report your application in the Windows Live Mail forums for assistance.

    http://www.windowslivehelp.com/product.aspx?ProductID=15

  • why I can't send emails with incredimail?

    All was working fine yesterday, but now I can't send emails with incredimail. I can receive mail okay.
    What should I do? I restored my laptop to the old times, but it has not helped the problem.

    Hi Myra,

    Thanks for posting your question in the Microsoft Community forums.

    I see from the description of the problem that you are unable to send emails with Incredimail.

    I imagine the inconvenience that you are experiencing. We are here to help and guide you in the right direction.

    I suggest you to contact the Incredimail Support to improve assistance in this regard.
    Hope this information helps you. If you need additional help or information on Windows, I'll be happy to help you. We, at tender Microsoft to excellence.
  • Cannot send emails with photo attachments using the Hotmail account.

    Original title: Hotmail account

    I can't send emails with photo attachments, why? I can send emails without a photo accessory.

    Thank you.

    Hi Keith,

    1 are you facing the issue only when you use the Mail application to send photo attachments?

    2. the problem occurs with all the accessories of the photo?

    3. is this problem only happens with Hotmail account?

    4. you receive messages or error codes?

    5 did you a recent software or changes to the material on the computer?

    This problem can occur if the account is not properly synchronized with Mail app or due to problems with the file format of the attachment of the photo you want to send.

    Method 1:

    You can try the steps to run the troubleshooter of app, synchronize licenses, update the Windows store, and also check for Windows updates.

    What to do if you have problems with a soft

    Note: The above article contains steps to change Windows Firewall settings. Make sure that the Windows Firewall is enabled after checking the issue.

    Method 2:

    If you have installed a third-party security software, you can temporarily disable third-party security software and firewalls installed on the system and check if you can send.

    Note: Be sure to enable the security software on the computer after checking the issue.

    You can also check if you can send the photo attachment using Hotmail like webmail account.

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

  • Update adobe reader dc 11 adobe reader software. emails with attachments not opening. can I go back to adobe reader 11 / or correction to send emails with attachments that will open?

    Update adobe reader dc 11 adobe reader software. When I send emails with attachments not opening to allow attachments to be read. How can I fix so that attachments can be viewed? or can I get back to adobe reader 11 where everything worked correctly. 3 computers NICU win 7 on 2 and earn 8.1 on 1.

    Hi Steve,.

    Please open Adobe Acrobat Reader DC, go to the Help menu and repair the installation.

    If the problem persists, you can uninstall Adobe Acrobat Reader DC, reboot your computer & install Adobe Reader using this link Adobe - Adobe Acrobat Reader DC Distribution.

    Let me know if you are still having a problem.

    Kind regards

    Nicos

  • Sending Email with multiple attachments using packages

    Hi all

    Version: 10.2.0

    I am trying to send mail with multiple attachments using packages.

    I tried to use Mail_tools which is in http://www.myoracleportal.com/

    But I can send with only one attachment. Are there other options which i it allows to send with multiple attachments.

    I have bad do I send attachments Jasper instance < < converted to bytes > >.

    Please advice...

    TIA,

    My dear friend,

    If you are looking for in this forum - you can get it.

    Have you checked the forum?

    Anyway,.

    Here's the starter for you->

    http://forums.Oracle.com/forums/search.jspa?threadID=&q=sending+email+with+multiple+attachments+using+packages++&objid=F75&DateRange=last90days&NumResults=15

    Kind regards.

    LOULOU.

  • When I try to send emails with attachments, I get an error box.

    original title: Email problem

    I have a problem I hope you can help me with. When I try to send an email with attachments, opens an error window, but the green progress bar never ends. The details box is empty. The message passes through, but still in my out box. Small e-mails without attachment happen normally. Any suggestions?

    If you use Outlook Express, this is a common problem. You have apparent dbx file corruption.

    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.

    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm

    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.

    Compact often as specified above.

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

  • Outlook Express 6.0 - mal to send emails with attachments

    Get the error message saying "some errors occurred while processing the requested tasks.  Please see the list of errors below for more details".  There is no error displayed messagees.  The tab tasks, there is a warning in the status column with no description.

    This only happens when you send an email with an attachment.  The message is then placed in the Outbox.  I checked that the message has been sent and received, but the message does not in sent items.  Outlook express keeps trying to send the message.

    You have apparent, but easily fixed dbx file corruption.

    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.

    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm

    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.

    Compact often as specified above.

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

Maybe you are looking for