How sending attachment vCO by mail server

Hi all

I try to send an attachment from my server vCO. I have a csv file that will be created from a workflow and I will send this file as an attachment by e-mail.

I found it here-> https://communities.vmware.com/thread/440886?start=0 & tstart = 0

But can anyone help me how can I implamented this here 'method reseourceElement.getContentAsMimeAttachment ()' in the workflow to "Notify": I try this here, but it doesn't work how I need.

var message = new EmailMessage();

// Override default settings if and only if input parameter is set
if ( smtpHost != null && smtpHost.length > 0 ){
message.smtpHost = smtpHost;
}
if ( smtpPort != null && smtpPort > 0 ){
message.smtpPort = smtpPort;
}
if ( username !=null && username.length > 0){
message.username = username;
}
if ( password != null && password.length > 0){
message.password = password;
}
if ( fromName != null && fromName.length > 0){
message.fromName = fromName;
}
if ( fromAddress != null && fromAddress.length > 0){
message.fromAddress = fromAddress;
}
message.toAddress = toAddress;
message.subject = subject;
message.addMimePart(content,"text/html; charset=UTF-8");

//Create Attachment
var fileAttachment = new MimeAttachment();
fileAttachment.name = attachmentName;
fileAttachment.content = attachment;
message.addMimePart(fileAttachment,"text/html; charset=UTF-8");

System.log( "sending mail to host: " + message.smtpHost + ":" + message.smtpPort + " with user:" + message.username
   + ", from:" + message.fromAddress + ", to:" + message.toAddress );

message.sendMessage

Thank you.

Assuming that you have a resource element mapped to your workflow as an attribute (or entered) named "resourceElement" and that "content" is a string variable containing the content of the body, the following setting should be done - going from memory here, but it must be close...:

var fileAttachment = resourceElement.getContentAsMimeAttachment();
message.addMimePart(content,"text/html; charset=UTF-8");
message.addMimePart(fileAttachment, fileAttachment.mimeType);
message.sendMessage();

Tags: VMware

Similar Questions

  • Password restricted to 16 characters when sending messages via the mail server outgoing Live/Outlook

    When you use a plus 16-character password, Thunderbird fails to connect to the SMTP outgoing/outlook live.

    The problem persists after you turn off my AV, turn off my VPN, from Thunderbird in safe mode and even after the addition of a '1' at the end of my password 16ch.

    Interestingly, Microsoft has the following warning when changing your password:
    WARNING: passwords longer than 16 characters cannot be used with the Xbox 360

    See the attached screenshots.

    It is a limitation imposed my mail server, not Thunderbird. It is not just the Xbox it's all e-mail clients. The major problem is, Microsoft either don't use folk with general IT experience, preferring the Microsoft professionals who really don't know anything else or deliberately do everything except web mail as difficult as possible. They want you in Microsoft walled garden.

    I'm starting to see four Internets. Apple, Microsoft, Google one, then the open internet, the champions of Mozilla, unfortunately none of the other three Internet really want interoperability. They like vendor lock-in...

  • How to change your e-mail server? Windows mail.

    When the mailbox windows comes up to put in, to and submit it automatically has an old email and the old server in the go, how can I change it to current email?

    Tools | Accounts. Delete the old account.

  • Difficulties to send emails, does not have my incoming/outgoing mail server.

    OT: Need help with my Email.

    I'm unable to send emails from my mail server incoming does not work my outgoing mail server does not work, I was try and try, but nothing helped. I can't see send mail sort I try my windows 7 is expired I need to update I don't know what I'm doing wrong. I read the instructions on the help and support, but that doesn't help much.

    You must ask your service provider for the specific settings for these two servers. Most of them have detailed instructions on how to enter for the e-mail program that use you (that didn't you name).

  • How to view the mail server internal to the secondary address.

    Peace,

    I have a wan with 3 addresses interface, and I have an internal e-mail server. When I send emails from the mail server it appears to the world as primary I address we will tell to x.y.z.67. I want it to appear in the secondary address x.y.z.68. How to do this?

    I already have a nat static port 25 110, 995, and several others, but which allows only when mail is sent to the mail server is not when sending mail from the mail server.

    any help?

    I did a quick laboratory with this and then forgot to post back :-)

    It was on an emulator, but I couldn't make it work.

    I tried to create a pool NAT using the secondary IP to the e-mail server to use, but it did not work.

    And there is no way to say IOS you want to overload the mail to a secondary IP address server IP IE. It overloads only on the primary IP on the interface.

    The only thing I can think right now is a NAT one to one between the real mail IP server and the secondary IP address, but this requires that you do not use the secondary IP address for port redirects to other servers.

    Is there a reason that it should be a secondary IP address IE. IOS will always be NAT, even if the IP address is not assigned to the interface.

    Jon

  • Mailing address: change the incoming mail server

    My servers have changed and I need to add new servers to my Mail application, but I can't change the incoming mail server: the text in the incoming mail server field is light gray and I can't choose or change. I changed the outgoing mail server and I can now send emails, but reception does not work. The incoming mail server is online and it is the same as the outgoing e-mail server.

    Can someone help me and tell how to change the incoming mail server?

    Ok. I found help in this thread: cannot not change the incoming mail server

  • Error message 'invalid base64 in continuous response data' when you try to access the mail server

    Under Thunderbird 16.0.2 Mac running OS 10.5.8 that worked perfectly for 6 years. Today I suddenly can't connect to the mail server Westnet (Western Australia). Automated or manual sending my password Gets the response "the password sending has failed. "Mail server mail.westnet.com.au replied: data not valid base64 in continuous response.

    I always have access to the web and can access my email via the web portal of Westnet or using the Mail from Mac client. Using Thunderbird but I can not connect.

    This sounds like the server think your already logged in. Try to turn off the machine for 10-15 minutes and have a cup of tea. This should be long enough to force a timeout if there is something hung up at the end of westnet and try again.

  • Thunderbird impossible sendmail on mail server yahoo after upgrading to Windows 7 Pro on an ASUS BP1AD PC. Tried 31.2 24.6 configured in IMAP & Thunderbird.

    After recently upgrading to Windows 7 Pro on an ASUS BP1AD PC, I can receive emails but NOT send using the yahoo mail server. I am set up to use the IMAP protocol. Other e-mail servers/accounts do not have this problem. I get the error message right is an alert which States: "an error has occurred when sending mail. The mail server responded: unverified address - see http://help.yahoo.com/I/us/yahoo/mail/manage/sendfrom-07.html. Please make sure your e-mail address is correct in your mail preferences and try again"if my email in Thunderbird is good enough upward with i. sending messages. Is there something obvious that I'm missing?

    did you actually check your mailing address in your web account to yahoo? That is to say had them send you a special courier to check that it actually works? Sounds stupid, but they made me do it years ago.

  • How can I change my outgoing mail server but keep the same email to send?

    Hi team,

    I have a new job and a new e-mail address of work, I now work for a charity in Australia, so I have an [email protected] address to my email.  Its all good while I'm at work, but the technology that put in place said when I'm at home, I need to use my own mail server outgoing (its optusnet so I'm at work).  So my question is how to keep my [email protected] outgoing e-mail address?

    When I try to send an email, I get the window that says optusnet... will not send the email and I can choose my other outgoing servers (iCloud or gmail) in a list, but when I change to one of these options automatically change the e-mail address sending the e-mail.

    As I said I work for a charity and the nature of some of my emails and requests, it is important that sending email looks official so it's kinda a problem unless I am limited to only send emails during work hours while I'm physically at work - which is not really going to do it for me.

    Any help or advice would be greatly appreciated.

    Have a nice day

    void

    You can access your work e-mail account via a web interface (browser)? If so, you can use it as who would use your work email of course.

    I don't know any other way at home, it's your ISP servers that carry your email and they don't recognize another provider.

  • How to find the right server to use windowsmail to send and receive e-mails?

    How to find the right server to use windowsmail to send and receive e-mails?

    Who is your current e-mail server? (Which is after the @ in your address).
     
  • How to attach the file to send by mail

    I'm trying to understand how to attach a file and send it to the email from my address book

    Hi marilynp47029385,

    Please see this KB doc for the procedure to send the file as an attachment by application: sharing PDF files

    You can also directly reach email account file. Compose an email and click on the attachment icon. Then, browse to the location of the file and select the file. It will focus on your mail.

    Let us know if you encounter any problem.

    Kind regards

    Meenakshi

  • How do I send the email from OSB with mail server that requires SSL or STARTTLS

    Hello world.
    My boss ask me on OSB configuration to support send an email to my corporate email server (using https chanel) and e-mail client (some of them is gmail that require SSL or STARTTLS).
    I have configured the OSB as tutorial in this link: http://blogs.oracle.com/christomkins/entry/sending_an_email_from_oracle_s
    The OSB cannot send emails from email account set up but it cannot connect to the mail server. I think the reason is secured with SSL or TLS authentication.

    There are a few problems similar to mine in this forum, but nobody has has solved yet.

    Can you tell me the solution you know? Any suggestion is appreciated.

    Concerning
    CUONG Pham

    Hi Cuong,

    As far as I KNOW, by email via the protocol SSL is not yet supported and is planned for the next version. You can lift SR with support for information.

    Kind regards
    Anuj

  • I get this when I try to send e-mail with an attachment that Windows Live Hotmail could not send your message because the server was busy. Please try again later. Please report this problem to Microsoft.

    Windows Live Hotmail could not send your message because the server was busy. Please try again later. Please report this problem to Microsoft.

    Hotmail as well as all the problems of Windows Live are Windows Live Solution Center. It's their jurisdiction.

    Please post on forum discussions for Hotmail:
    http://windowslivehelp.com/forums.aspx?ProductID=1

  • Unable to send a photo as an error of seizure-3203 e-mail server

    How can I fix; Server error 3203; problem

    I have a file of "pictures I want to send to a friends PC;" However whenever I push wne with it as an attachment to an email address it back with the SERVER error message ERROR 3203;  How do I solve this.  Brian * address email is removed from the privacy *.

    Hello BRIANCRAIGvr,

    1. What is the mail client installed on your computer?

    2. How are you trying to send to send a file, you right-click on the file and click on send by e-mail?

    3 have you tried to attach the photo by using the attach to e-mail option?

    I suggest you use the attach to email option and check if you have the same problem.

    Thank you
    Irfan H, Engineer Support Microsoft Answers.

  • Alert - an error occurred sending a message - mail server has sent a wrong message: 5.7.1 < unknown - what it means?

    When using Mozilla Thunderbird - when I try to send emails, the following will occur;

    "ALERT".

    Error sending mail. The mail server has sent a wrong message: 5.7.1 < unknown [14.137.73.189] > client host rejected: access denied.

    Why I was able to send emails to specific email addresses - but now, for some reason that I don't understand - I can't.

    How can I solve this problem?

    What is your SMTP server?
    What is the part of your e-mail address or your email provider?
    What is your ISP?

Maybe you are looking for

  • Safari automatically open web

    Hai. I had the same problem with my safari. When I'm on web browsing or youtube, my safari open hungry web call somewhere and I all try, remove the cover, private browsing but it always pop up. its opening on the other tab, but sometimes it open in t

  • 23 - f204a Pavilion: Pavilion 23

    Hi today I opened my computer and it would not pass the hp logo. Called hp, they advise to release static electricity. Has done this model has worked well. Just went to re open model and is the same (10 h later) tried to dissipate static electricity

  • Compaq presario v6000 v6409tu disk hard bios self-test fail

    Hello Windows xp no my pc compaq v6000 not starting and bluescreen showed a couple of times. I ran the BIOS (phoenix) disk hard diagnosis and the test failed. When I opened my HDD I noticed green rust as deposits into the connector on the hard drive.

  • CHESS TITANS Windows Vista Edition Family Premium in Windows 7 Starter

    Please, help me to copy game CHESS TITANS of my PC (Windows Vista Home Premium 32 bit SP.2) mini computer laptop of my son (Windows 7 Starter Edition) and make this game run in the second computer. Thank you very much!!!

  • 531 s Dell power supply-no molex

    Hello everyone, I recently bought a HARD drive cooling fan for my 531 s and when I went to install it, I realized that factory supply has no power molex connectors. the connector on the cooler is a passage from molex with male and female ends. The po