Using MTA SDK for sending emails

Hi,
After taking a look to the MTA SDK documentation I still have a key question.
My program needs to send emails to an existent SMTP server - Sun Messaging Server - running in a different box. Can I use MTA to send those emails? I read in several places "Callable Send" can be used only for sending messages from local host, so I'm not sure in my case it can be done.
If it's possible, I'd appreciate any sample of how to do it.
Thanks in advance,
Jorge Ortiz Claver

Yeah, I know I need to send the message connecting to Sun MTA but I don't know how. Actually, I know I can use a SMTP client but I'd need to use a third-party library (or build it by my own). I can't use mailx or sendmail from my application. I wouldn't have much control over its execution and each mail submit would mean a context change in my application. I need some kind of API for doing it programatically.
My question is: what is the MTA SDK for? I know I can send/receive messages but I can't understand why I can't do it from remote. As far as I can understand, it seems like MTA SDK works directly with the same local resources Sun MTA server is using, right?
Thanks again,
Jorge

Similar Messages

  • Is there any problem to use multiple threads to send email with JavaMail

    Dear all,
    I am using JavaMail 1.3.2 to send emails with SMTP, it works very well for a long time.
    But one day, I found that the email service hanged and I could never send email again until I restart the tomcat. I found that the reason was a deadlock had been created, the required resource for sending email had not been released.
    I guess the error is due to multiple threads are sending email at the same time. I made a test to create seperate thread for sending each email. After few days, I found this deadlock happened again. So, my question is: Can I use JavaMail with multiple threads? If not, I may need to sychronized all the thread that using JavaMail. I would like to make sure this is the reason for causing the deadlock problem.
    Here is part of my code for using JavaMail:
    transport = session.getTransport("smtp");
    transport.connect(email_host, smtp_user, smtp_pass);
    message.saveChanges();
    transport.sendMessage(message,message.getAllRecipients());
    which is very standard call, and it worked well for a long time.
    Here is part for my thread dump on tomcat:
    (Thread-339)
    - waiting to lock <0x5447c180> (a sun.nio.cs.StandardCharsets)
    (Thread-342)
    - locked <0x5447c180> (a sun.nio.cs.StandardCharsets)
    It seems that these happened after call the method transport.sendMessage() or message.updateChanges()
    , and the underlying implementation may require the JRE StandardCharsets object. But the object had been locked and never be released. So, the sendMessage() or updateChanges() can't be completed.
    Please give me some helps if you have any idea about it.
    Thanks very much!
    Sirius

    Note that the Nightly build gets updated daily (and sometimes more than once in case of a respin) and it is always possible that something goes wrong and it doesn't work properly, so be prepared for issues if you decide to stay with the Nightly build and make sure to have the current release with its own profile installed as well in case of problems.
    See also:
    * http://kb.mozillazine.org/Testing_pre-release_versions
    *http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    *http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    *http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    My gmail, which is correctly configured for Mail with gmail SMTP and Google IMAP, works for awhile on Mail, which I leave open while working on other applications. But several times a day I get msg from Google: "We recently blocked a sign-in attempt to your Google Account" . . . and requiring me to verify my account details, re-enter passwords, confirm security settings (or change them from "disable" to "enable less secure methods" and so on). In Mail I also have tried "taking all accounts online", and re-entering my gmail password inside Mail account settings. These steps successfully re-set comms between gmail and Mail ... for awhile, then it happens again. Enough occurrences over a work day that I just quit Mail and revert to accessing gmail directly. Apple Care advisor and an Apple knowledge base article say that Apple can't deal with this, as gmail is third-party app, and they refer me to gmail, and so far I've found nothing helpful there.
    From today I also have several instances of a window saying "Mail has unexpectedly closed" and asking me to Re-open it.
    I also use Yahoo mail, which stops working with Mac Mail at the same time as gmail, but I do not receive notices to re-verify from Yahoo.
    I recently upgraded from Mavericks to Yosemite. The Mail problem happened occasionally with Mavericks but is far more frequent with Yosemite.

  • Error Message when using Photoshop Element 9 sending email

    I was using Photoshop Element 9 sending email on Windows Live Mail.
    It was working perfect.
    A week ago, my computer had the problem and need to format and reinstall everything again.
    After that, when I used Photoshop Element 9 to send email using Windows Live Mail 2012.
    It came up error message in below:
    "Elements Organizer could not finish creating your E-mail message.
    Alternatively, you can use the Adobe E-mail Service via the Elements Organizer Preferences dialog."
    I don't want to use Adobe E-mail Service because it is very limited for email function such as attached another files or change email contents.
    Would you please give me some idea how to solve the problem ?
    Thanks,
    Joe

    Please refer the below link:
    http://forums.adobe.com/message/3284248#3284248
    http://helpx.adobe.com/photoshop-elements/kb/freeze-or-error-no-email.html
    -Harshit yadav

  • Alert Manager Validation for sending Email

    Hi All,
    I am planning to use Alert Manager for sending out email in case if there is any locks in the database. I am not able to find a way to send a mail only when there is a lock in the database.
    Is there any way to do a validation on Oracle Alert manager before sending the mail ?
    Regards
    Sridhar M

    I am planning to use Alert Manager for sending out email in case if there is any locks in the database. I am not able to find a way to send a mail only when there is a lock in the database.
    Is there any way to do a validation on Oracle Alert manager before sending the mail ?Please see the docs referenced in old threads, it should be helpful.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Alert+AND+Manager&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Alert+AND+Diagnostics&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Alert+AND+Workflow&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Setting default account for sending email

    I have 4 accounts I use for sending email, but would like to have one be the default and can't figure how to do that. there is a check box next to the outgoing server dropdown that says use only this account. I don't think that is what I want, nor am i clear what that would do.
    Is there a way to set a preferred outgoing account?
    Does that require a plug in or helper app of some sort.
    thanks for any suggestions.

    In Mail>Preferences>Composing:
    Use Send new messages from: to select an account.

  • Can I use DeliveryManager just to send email with no document?

    Can I use "oracle.apps.xdo.delivery.DeliveryManager" to just send email without any document attached? or
    Is this only used to deliver the documents by email?
    I just want to use DeliveryManager just to send email with content in the body of the email. I am using BI Publisher API.
    Can any of you provide sample input for the above?

    Hi,
    You can use iMovie to record the message and save it as an email sized item and send the file as email like before.
    For those iChat AV users without a Cam and the AIM users without a cam you can do One-Way Viedo chats.
    Once you have a recorded Video file you can also drop the file on any Buddies name in you iChat Buddy list rather than using email.
    For those using other services you can set up a Jabber account and enable the required Transport/Gateways and send the files that way.
    http://www.jabber.org.au/ichat = Australian Page
    AllForces
    These are the two main information pages on how iChat can connect to the other IM services.
    Jabber Public Server list
    That would appear to be everybody.
    Ralph

  • SAPCONNECT guide for sending Emails from BW System to Individual Email IDs

    Hello Everybody,
    If somebody can send me a pdf guide for SAPCONNECT inorder to configure Information Broadcasting in SAP BW for sending Emails to user's mail Id from BW system i will reward points to the helper for same if the help found useful as iam struggling for a pdf guide since long but couldnot find one ,not even over google,i dont need help site links ,i have tried them already ,they dont lay the exact procedure ,but a pdf guide ,my email id is [email protected] .
    Regards,
    Saumya

    Hello Vikash,
    Plz check i have rewarded you points for this forum under very helpful answers.Kindly now plz help me with this matter:
    I got ur document ,it was very helpful.Actually though i have already done most of these steps but i did all these steps all over again.Have u already made configuration for BW Information Broadcasting on your side because although i have done all these steps but wt happens is that the mails get collected in the SOST transaction and iam still not able to send mails and the error displayed is as :
    Message cannot be transferred to node SMTP due to Connection Error .
    Kindly please revert back to this error at earliest.
    Regards,
    saumya

  • What to do about a virus that uses your mac to send email?

    what to do about a virus that uses your mac to send email?

    It's highly unlikely that your Mac has a virus, since no virus, worm or trojan has been reported, much less confirmed, as having the behavior you mention. As LB suggested, most likely it's your email account itself that has been compromised, or some other computer (a Windows system, almost certainly) that has your addresses on it has been infected.
    Check the "sent" folder for your email account and see if the bogus messages are shown there. If they are, that at least would verify that the emails were sent via your email account. Report back and let us know whether your email account is POP, IMAP or Exchange, and who your email host is.
    If the messages are not shown anywhere in your "sent mail" folder, then someone has almost certainly gotten hold of your contact list and spoofed your email address.
    Regards.

  • Servlet for sending email error

    i working for send email using servlet and html. when i run i got this error..
    what cause this problem.
    please someone help me. urgent!!!
    thank you in advance
    servlet error........
    ENCOUNTERED EXCEPTION: java.lang.ArrayIndexOutOfBoundsException
    java.lang.ArrayIndexOutOfBoundsException
         at EmailSMSServlet.doPost(EmailSMSServlet.java:123)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

    here is my code...actually my program send email from SMS. i parser SMS to email format. My SMS part is working but when i combine it,i got error as above. I tried run without servlet (using command prompt) it working properly and i can send email.
    public class EmailSMSServlet extends HttpServlet
    CService srv;
    int status;
    LinkedList msgList;
         public void init(ServletConfig config) throws ServletException      {
         super.init(config);
         srv = new CService("com4", 9600);
         msgList = new LinkedList();
         srv.initialize();
         srv.setCacheDir(".\\");
    public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException
         PrintWriter writer = response.getWriter();
    response.setContentType("text/html");
    writer.println("<html>");
    writer.println("<head>");
    writer.println("<title>SMS TO EMAIL</title>");
    writer.println("</head>");
    writer.println("<body bgcolor=\"blue\">");
         writer.println("test");
              try
              status = srv.connect();
                   if (status == CService.ERR_OK)
                   srv.setOperationMode(CService.MODE_PDU);
    if(srv.readMessages(msgList,CIncomingMessage.CLASS_ALL)==CService.ERR_OK)
              for (int i = 0; i < msgList.size(); i ++)
              CIncomingMessage msg =(CIncomingMessage)msgList.get(i);
              String s=msg.getText();
              String from1=msg.getOriginator()+"@mysite.bla.bla";
              writer.println(s);
              writer.println("<p>");
              writer.println(from1);
              writer.println("<p>");
    // parser sms to email ...
    String delim = "#";
    StringTokenizer st= new StringTokenizer(s,delim);
    String str[] = new String[st.countTokens()];     
    int j=0;
    while (st.hasMoreTokens())
         str[j++] = st.nextToken();
         writer.println("<p>");
         writer.println("Kepada:");
         writer.println(str[0]);
         for(int k = 0; k < str.length; k++)
    writer.println(str[k]);
    // Send mail using javamail.....
    Properties props=new Properties();
    props.put("mail.transport.default",blah");
    props.put("mail.smtp.host","blah");
    try{
    Properties props=new Properties();
    props.put("mail.transport.default","smtp");
    props.put("mail.smtp.host","host");
    Session mailSession=Session.getInstance(props,null);
    Message mssg=new MimeMessage(mailSession);
    mssg.setSubject(str[1]);
    mssg.setContent(str[2],"text/plain");
    Address to =new InternetAddress(str[0]);
    mssg.setRecipient(Message.RecipientType.TO,to);
    Address from=new InternetAddress(from1);
    mssg.setFrom(from);
    Transport.send(mssg);
         writer.println("Succes");
    } catch (Throwable t) {
    writer.println("<font color=\"red\">");
    writer.println("ENCOUNTERED EXCEPTION: " + t);
    writer.println("<pre>");
    t.printStackTrace(writer);
    writer.println("</pre>");
    writer.println("</font>");
         srv.disconnect();
         else
         writer.println("Connection to mobile failed, error: " + status);
         catch (Exception e)
              e.printStackTrace();
         writer.println("<br><br>");
    writer.println("</body>");
    writer.println("</html>");
    thanks

  • How to use java mail to send email to hotmail box

    how to use java mail to send email to hotmail box??
    i can send emails to other box(my company's email account) but for hotmail, the program didnt print any err or exception the recepient cant receive the mail.
    thanks

    you ust to download activation.jar and mail.jar and add them to your build path.
    i have used the googlemail smtp server to send mail the code is following:
    public void SendMail()
    Properties props = new Properties();
    props.put("mail.smtp.user", username);
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.port", port);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.socketFactory.port", port);
    try{
         Authenticator auth = new SMTPAuthenticator(username,password);
    Session session = Session.getInstance(props, auth);
    MimeMessage msg = new MimeMessage(session);
    msg.setText(text);
    msg.setSubject(subject);
    msg.setFrom(new InternetAddress(senderEmail));
    msg.addRecipient(Message.RecipientType.TO, new InternetAddress(receiver));
    Transport.send(msg);
    }catch(Exception ex) {
         System.out.println("Error Sending:");
    System.out.println(ex.getMessage().toString());
    and this the SMTPAuthenticator Class which you will need too.
    class SMTPAuthenticator extends javax.mail.Authenticator {
         private String fUser;
         private String fPassword;
         public SMTPAuthenticator(String user, String password) {
         fUser = user;
         fPassword = password;
         public PasswordAuthentication getPasswordAuthentication() {
         return new PasswordAuthentication(fUser, fPassword);
         }

  • Components required for sending Email from SAP [Kernel Release 46D]?

    Hi All,
    Can somebody please tell me the components and the Configuration settings required for sending Emails from SAP system[Kernel Release 46D] to the mail server[Win NT] using SMTP.
    From note 455127, I understood that "Sap Internet Mail Gateway" is required and there are other settings to be done. (SAPconnect with RFC can only be used as the Kernel version is 46D)
    It will be great if somebody can explain me in simple steps if He/She has done this before.
    Thanks,
    Varun

    Varun,
    sendmail comes with UNIX OS, there are versions of sendmail programs available for Windows too, but i guess you have to purchase them.
    Another alternative is a discontinued product called SAP Exchange connector, if you have a Windows environment and MS Exchange server as your mail server, you could use a SAP exchange connector and get your SAP Email config done.
    Regards,
    Siddhesh

  • An advanced solution for sending email from Solution Manager (or CRM)

    Hi all,
    did anyone use blog "An advanced solution for sending email from Solution Manager (or CRM)"
    <a href="/people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm:///people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm
    I´ve got some problems:
    I tried to implement your solution in our SAP system. I´m new to ABAP and so it´s a little bit try and error for me.
    I´ve got some errors:
    In method EXEC_SMART_FORM_WITH_TEXT (from note 935670) :
    - method string_to_soli does not exist. There is a method xstring_to_solix.
    When I change to method xstring_to_solix
    - "L_STRING" is not type-compatibly to "IP_XSTRING".
    In method ZSM_ATTACH_PHIO_DOCU:
    - field DOCUMENT is unknown
    Regadrs
    Andy

    Hi all,
    did anyone use blog "An advanced solution for sending email from Solution Manager (or CRM)"
    <a href="/people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm:///people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm
    I´ve got some problems:
    I tried to implement your solution in our SAP system. I´m new to ABAP and so it´s a little bit try and error for me.
    I´ve got some errors:
    In method EXEC_SMART_FORM_WITH_TEXT (from note 935670) :
    - method string_to_soli does not exist. There is a method xstring_to_solix.
    When I change to method xstring_to_solix
    - "L_STRING" is not type-compatibly to "IP_XSTRING".
    In method ZSM_ATTACH_PHIO_DOCU:
    - field DOCUMENT is unknown
    Regadrs
    Andy

  • How many of you use CTRL + Enter to send email from Outlook

    It's a much faster option...and you don't have to grab that pesky mouse!

    I was working this morning and I asked my fiance if she used CTRL + Enter to send email from Outlook and she was not even aware that was an option. I have been using it for years and I wondered how many of you SpiceHeads use it as well?
    This topic first appeared in the Spiceworks Community

  • Unable to use RAS SDK for server-side printing for XI 3.1

    Hi all,
    I am using RAS SDK for server-side printing.  Here are my codes:
    ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
    IEnterpriseSession enterpriseSession = sessionMgr.logon("Administrator", "", "cdi5boe", "secEnterprise");
    IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
    //out.println("Current User is = " + enterpriseSession.getUserInfo().getUserName());
    //out.println ("<br>");
    IInfoObjects infoObjects = iStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_Kind='CrystalReport' AND SI_NAME = 'Sales Print'");
    IInfoObject infoObject = (IInfoObject)infoObjects.get(0);    
    IReportAppFactory reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportFactory");
    ReportClientDocument rcd = new ReportClientDocument();
    rcd = reportAppFactory.openDocument(infoObject,0, java.util.Locale.US);
    //Create print options to use when printing.
    PrintReportOptions printOptions = new PrintReportOptions();
    printOptions.setPrinterName("
    cdi5boe
    HPLaserJ");
    printOptions.setJobTitle("Test Printer Job");
    printOptions.setPrinterDuplex(PrinterDuplex.horizontal);
    printOptions.setPaperSource(PaperSource.auto);
    printOptions.setPaperSize(PaperSize.paperLetter);
    printOptions.setNumberOfCopies(1);
    printOptions.setCollated(false);
    PrintReportOptions.PageRange printPageRange = new PrintReportOptions.PageRange(1,1);
    printOptions.addPrinterPageRange(printPageRange);
    //Print report.
    rcd.getPrintOutputController().printReport(printOptions);
    When I run the report, I got the following errors:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: com.businessobjects.crystalreports.printer.bean.ReportPrinter---- Error code:-2147215357 Error code name:internal
    I consult the Diamond Technical Community and I found the issue related to printer name:
    https://boc.sdn.sap.com/node/498
    However, I did check the printer name, it is accessible via Windows Explorer.
    Anyone knows how to resolve this?
    Regards,
    Derek

    It doesn't appear to be listed as a dependency in the developer docs, but would you try putting the ReportPrinter.jar in your RAS app?
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Dual monitor - Macbook Pro

    Hi. I am really enjoying my Mac with an additional monitor. However, under some conditions, such as using a graphic application, it would be better to have the external monitor to be the main monitor. I have not found anywhere a setting that would al

  • Longrunning query on multiprovider

    Hi All, In our Production system, there is one multiprovider for which the queries are taking too much time to complete and at the end they result result in "TIME_OUT" dumps. This multiprovider contains receipt level data and hence data volume is qui

  • Is there a way to view image metadata in Lightroom before importing?

    Lightroom 4.3 Win7-64 Canon 6D raw files It would be helpful to be able to examine camera data while choosing which images to import.

  • Only 0 quantity of material available..

    can any one of you plz suggest , i try to do a test run of sales process. I have posted enough stock for a material , but when i try to deliver , the system prompts. Only 0 quantity of material available.

  • How to get Documents folder back in the Dock?

    Hi all While playing Leopard, I accidentally removed the Documents folder from the dock. Anyone know how to get it back in its original form (ie- not adding the Alias, but the stackable, entire Documents folder)? many thanks