Java SMTP Component (With Attachment capability)

Hi All!
I would like to ask regarding SMTP in java with the capability to attach microsoft excel files and txt file.
I need to use an html file also as the message for the mail (This is what the recipient will be reading), and need to attach excel files and the text files that I generated.
I previouly tried jakarta commons net smtp but I was not able to make some attachments to the mail and cannot use html file as for the mail.
Any idea of another smtp java component which is easy to use and has these features and most of all... free to use?� (or with cracks)
Thank you and God Bless,
MaDz

Hi All!
I would like to ask regarding SMTP in java with the capability to attach microsoft excel files and txt file.
I need to use an html file also as the message for the mail (This is what the recipient will be reading), and need to attach excel files and the text files that I generated.
I previouly tried jakarta commons net smtp but I was not able to make some attachments to the mail and cannot use html file as for the mail.
Any idea of another smtp java component which is easy to use and has these features and most of all... free to use?� (or with cracks)
Thank you and God Bless,
MaDz

Similar Messages

  • Java SMTP Client and Outlook unique behaviour

    Hi
    I have written a simple Java client to send a mail with an attachment to a mail address. Its a normal Java SMTP client with multi part file attachment.
    There is a unique behavior happening which is eating my head for some time now. The issue here is that when i try to send an attachment from my Outlook the message is being delivered to the recipient successfully in recipients inbox. But when i send the same attachment through my standalone Java client its not getting delivered to the recipient(not 100 % sure, spamming maybe).The client is not throwing any exception also so its become very hard as to whats going on as i think the mail is getting delivered but not sure. The recipient email address is on a Linux box so don't know how to access it. please help me on this.
    Thanks
    Vikeng21

    Hi EJP , Below is the code that i have written for the same
    import java.io.File;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.DataSource;
    import javax.activation.FileDataSource;
    import javax.mail.Address;
    import javax.mail.BodyPart;
    import javax.mail.Message;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.SendFailedException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    public class msgshow {
    public static void main(String[] args) throws Exception {
         String host = "***hostname***";
         String from = "***fromEmailId***";
         String to = "***toEmailId****";
         String filename = "log.txt";
         try{
              // Get system properties
              Properties props = System.getProperties();
              // Setup mail server
              props.setProperty("mail.smtp.host", host);
              //Doing this for testing as the properties are being set by using default system user properties.If user authentication is required
              boolean authValue = true;
              if(authValue){
                   props.setProperty("mail.user", "***username***");
                   props.setProperty("mail.password", "***password***");
              props.setProperty("mail.debug", "true");
              // Get session
              javax.mail.Session session = javax.mail.Session.getInstance(props, null);
              // Define message
              Message message = new MimeMessage(session);
              message.setFrom(new InternetAddress(from));
              message.addRecipient(Message.RecipientType.TO,
              new InternetAddress(to));
              message.setSubject("VVVVVVVVSSSSSSSSSS");
              // Create the message part
              BodyPart messageBodyPart = new MimeBodyPart();
              // Fill the message
              messageBodyPart.setText("Here's the file");
              // Create a Multipart
              Multipart multipart = new MimeMultipart();
              // Add part one
              multipart.addBodyPart(messageBodyPart);
              // Part two is attachment
              // Create second body part
              messageBodyPart = new MimeBodyPart();
              // Get the attachment
              DataSource source = new FileDataSource(filename);
              // Set the data handler to the attachment
              messageBodyPart.setDataHandler(new DataHandler(source));
              //before setting the file name we have to set the proper file name
              final File individualFile = new File(filename);
              String fname = individualFile.getName();
              // Set the filename
              messageBodyPart.setFileName(fname);
              messageBodyPart.setDisposition(Part.ATTACHMENT);
              // Add part two
              multipart.addBodyPart(messageBodyPart);
              // Put parts in message
              message.setContent(multipart);
              // Send the message
              Transport.send(message);
              System.out.println("Message is sent");
         }catch(SendFailedException e){
              System.out.println("------------ Send Failed Exception -----------");
              Address adr[] = e.getValidSentAddresses();
              for(int i = 0; i < adr.length;i++){
                   System.out.println("------- Valid Sent address" + adr);
              Address adr1[] = e.getValidUnsentAddresses();
              for(int j = 0; j < adr1.length;j++){
                   System.out.println("------- Valid Sent address" + adr[j]);
              e.printStackTrace();          
         }catch(Exception ez){
              ez.printStackTrace();

  • How to deploy a pure jave development component to server?

    i have created a pure java development component.
    but i cannot find a way to deploy it to server
    is there any way?

    You need to essencially wrap your java development component with a deployable development component.
    In order to do that, you need to:
    - Define a public part for your development component of type assembly.
    - Create a deployable DC ( one that results in a SDA or a EAR file ).
    - Reference your DC from the deployable DC. This will include the generated .jar file into the project.
    The definitions of the different types can be found here:
    http://help.sap.com/saphelp_nw04/helpdata/en/93/d5a73f05c4265de10000000a114084/content.htm
    I would either create a library component ( results in SDA ) or a web dynpro component ( ear file ).

  • Java mail with attach file

    Hi , I need a example with java send mail can attach a file
    thnak you

    Hey cool... thanking you phdk. Ta.
    package krc.utilz;
    import java.util.Properties;
    import java.io.File;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.Message;
    import javax.mail.Multipart;
    import javax.mail.BodyPart;
    import javax.mail.MessagingException;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.InternetAddress;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.PasswordAuthentication;
    public class Emailz
      private static class MyAuthenticator extends javax.mail.Authenticator {
        @Override
        protected PasswordAuthentication getPasswordAuthentication(){
          return new PasswordAuthentication("#########", "#########" ); // <<<<<<<<<<<<<<<<<<<
      private static final Properties props = new Properties();
      static {
        props.put("mail.smtp.host", "smtp.googlemail.com");
        props.put("mail.smtp.port", "465");
        props.put("mail.smtp.user", "########"); // <<<<<<<<<<<<<<<<<<<
        //props.put("mail.smtp.starttls.enable", "true");
        props.put("mail.smtp.auth", "true");
        props.put("mail.smtp.debug", "true");
        props.put("mail.smtp.socketFactory.port", "465");
        props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
        props.put("mail.smtp.socketFactory.fallback", "false");
      public static void send(String subject, String message, String from, File[] attachments, String... recipients)
        throws MessagingException
        Session session = Session.getDefaultInstance(props, new MyAuthenticator());
        session.setDebug(true);
        // head
        Message msg = new MimeMessage(session);
        msg.setFrom(new InternetAddress(from));
        InternetAddress[] addressTo = new InternetAddress[recipients.length];
        for (int i=0; i<recipients.length; i++) {
          addressTo[i] = new InternetAddress(recipients);
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    msg.setSubject(subject);
    // body
    Multipart multipart = new MimeMultipart();
    // message
    BodyPart msgPart = new MimeBodyPart();
    msgPart.setText(message);
    multipart.addBodyPart(msgPart);
    // attachments
    for ( File attachment : attachments ) {
    MimeBodyPart attPart = new MimeBodyPart();
    attPart.setDataHandler(new DataHandler(new FileDataSource(attachment)));
    attPart.setFileName(attachment.getName());
    multipart.addBodyPart(attPart);
    msg.setContent(multipart);
    Transport.send(msg);
    public static void main(String[] args) {
    try {
    //send(String subject, String message, String from, File[] attachments, String... recipients)
    send(
    "Testing attachments" // subject
    , "This is an email with an attachment" // message
    , "########@gmail.com" // from // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    , new File[] {new File("C:/Java/home/src/krc/utilz/Emailz.java")} // attachments
    , "########@gmail.com" // to // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    } catch (Exception e) {
    e.printStackTrace();
    Cheers. Keith.

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • How to use Java with PL/SQL commands to send an email with attachment

    Apologizes in advance if this is the wrong place to ask the question.
    I need to use Java with PL/SQL commands to send an email with attachment. My java application runs from the command line and does some magic to gather info from an Oracle 11g db. If the DB has sendmail configured, I'd like to send the results of the data gathering as an attachment to the email addresses. I'm not sure how to do this. I've been reading up on on PL/SQL can send email with UTL_SMTP - with attachments. I'm just not sure how to translate that into being triggered by my Java application. Any suggestions or pointers on what I should read would be appreciated.
    Background - I've been programming in Java for 10+ years, but this is my first time using databases. I also have been on these forums for a long time, but lost my profile when it was switched to Oracle.
    Thanks for all help.

    user13726880 wrote:
    The original requirements were put together and given to me, an Oracle newbie. They expected the Java app to use something intrinsic to Oracle and Unix sendmail. To solve my problem, I use a JDBC connection to run some SQL commands. I take that data, format it and send the results by email to the user. By default the requirement is to send it as an HTML attachment using Unix 'sendmail'. So I do that using Runtime exec. I have also added JavaMail functionality as an alternative to sendmail. It works great and as expected.Sounds like a reasonable solution.
    Note however that PL/SQL itself can send email. And PL/SQL can call unix sendmail too.
    However myself I would have done it in java with JavaMail.

  • How to use MyFaces component with Java Creator 2

    Please advise for me the way to use Myfaces component with Java Creator 2. Thanks

    Apologies for the late reply, but currently what exists generally for MyFaces integration with Creator is on this blog:
    http://wiki.java.net/bin/view/Javatools/CustomComponentLibraries
    You might also want to post the same question on the nbusers alias on netbeans.org, referencing Visual Web Pack
    Regards,
    -Brad Mayer

  • SMTP Multiple emails with attachements Powershell

    Hello guys, my first post here and I was hoping someone could help me a little bit. I was working on a powershell project that sends an email with multiple attachements from a directory. Filenames i this directory will change all the time. My code so far
    is:
    #Connection Details
    $username=”[email protected]
    $password=”xxxxxxxx”
    $smtpServer = “smtp.gmail.com”
    $msg = new-object Net.Mail.MailMessage
    #Change port number for SSL to 587
    $smtp = New-Object Net.Mail.SmtpClient($SmtpServer, 587) 
    #Uncomment Next line for SSL  
    $smtp.EnableSsl = $true
    $smtp.Credentials = New-Object System.Net.NetworkCredential( $username, $password )
    #From Address
    $msg.From = "[email protected]"
    #To Address, Copy the below line for multiple recipients
    $msg.To.Add(“[email protected]”)
    #Message Body
    $msg.Body=”Please See Attached Database Files”
    #Message Subject
    $msg.Subject = “DATABASE”
    write-host "SENDING FILES"
    #your file location
    $files=Get-ChildItem “C:\CM\Send\”
    Foreach($file in $files)
    Write-Host “Attaching File :- ” $file
    $attachment = New-Object System.Net.Mail.Attachment –ArgumentList C:\CM\Send\$file
    $msg.Attachments.Add($attachment)
    $smtp.Send($msg)
    $attachment.Dispose();
    $msg.Dispose();
    write-host "Mail Sent Successfully"
    And this code works just fine for this, then I realize that gmail only has 25 MB max attachement size and the files I want to send is around 18 mb. 
    Anyone have any good ideas to split all files in the directory into seperate emails. i.e one email per file? Having trouble doing so because the filenames keep changing daily.
    I am a beginner in this kind of language, but anything will help to get me on the right track :-)
    Thank you.

    Hi Christopher,
    welcome to Technet!
    One piece of advice right away: The Technet forums have a great functionality to post code ("Insert Code Block"). Using it will get you something like what I've posted below.
    If you know that each of your files will be smaller than your limit, you may be able to get away with this:
    #your file location
    $files = Get-ChildItem "C:\CM\Send"
    Foreach($file in $files)
    Write-Host "Attaching File :- " $file
    $attachment = New-Object System.Net.Mail.Attachment –ArgumentList $file.FullName
    $msg.Attachments.Add($attachment)
    $smtp.Send($msg)
    $msg.Attachments.Clear()
    What this does is get all files in the folder, and for each file, it attaches it to the mail, sends the mail and then clears the attachments.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Java mail With Attachment

    can any one please give me some links or code sniplet
    for mailing with attachment ........

    Sure. First download and install JavaMail. Then look in the "demo" directory immediately under the directory where you installed it. You will find examples that do attachments (sendfile.java) and many more things.

  • Adf Mail with Attachment

    Hi Experts,
    i'm Using Jdeveloper 11.1.1.5.0.
    My Scenario is to send a mail with Attachments from Adf Application.
    I have sent a Mail Without attachment from Adf Application, it works fine.
    But, it have to send a mail with Attachment.
    Anyone Guide me

    Cvele_new_account
    Thank for your Reply
    I'm Using Jdeveloper 11.1.1.5.0
    I am   using the following Code for send a mail without Attachment from Adf Application.
    Mail Sent Successfully.
    Code:
        public String send(String SMTPhost, String From,   String To,   String Subject,  String Body,  String Attachment,  String Username,   String Password,    String Port, String filename1)
                              String  to= To, subject = Subject , from = From ,
                              cc = null, bcc = null,  url =null;
                              String mailhost = SMTPhost;
                              String  user = Username , password = Password;
                              boolean debug = false;
                              boolean verbose = false;
                              boolean auth = true;
                              String prot = "smtp";
                              try{
                                  String filename = System.getProperty("java.home")+"/lib/security/cacerts".replace('/', File.separatorChar);
                                  String password2 = "xxxxxxxxx";
                                  System.setProperty("javax.net.ssl.trustStore",filename);
                                  System.setProperty("javax.net.ssl.trustStorePassword",password2);
                              Properties props = System.getProperties();
                              props.put("mail." + prot + ".host", mailhost);       
                              props.put("mail." + prot + ".auth", "true");
                              props.put("mail.smtp.starttls.enable", "true");
                              props.put("mail.smtp.port", Port);
                              // Get a Session object
                              Session session = Session.getInstance(props, null);
                              if (debug)
                                  session.setDebug(true);
                              Message msg = new MimeMessage(session);
                              if (from != null)
                                  msg.setFrom(new InternetAddress(from));
                              msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
                              if (cc != null)
                                  msg.setRecipients(Message.RecipientType.CC,
                                                          InternetAddress.parse(cc, false));
                              if (bcc != null)
                                  msg.setRecipients(Message.RecipientType.BCC,
                                                          InternetAddress.parse(bcc, false));
                              msg.setSubject(subject);
                              String text = Body;
                              msg.setText(text);
                                  MimeBodyPart messageBodyPart = new MimeBodyPart();
                                  String filename2 = "D://" + filename1;
                                      System.out.println("Exact path--->" + filename2);
                                      DataSource source = new FileDataSource(filename2);
                                      messageBodyPart.setDataHandler(new DataHandler(source));
                                      messageBodyPart.setFileName(filename2);
                                  Multipart multipart = new MimeMultipart(filename1);
                                  multipart.addBodyPart(messageBodyPart);
                                  msg.setContent(multipart);
                                    SMTPTransport t =
                                  (SMTPTransport)session.getTransport(prot);
                              try {
                                  if (auth)
                                      t.connect(mailhost, user, password);           
                                      t.sendMessage(msg, msg.getAllRecipients());
                              finally {
                                  if (verbose)
                                      System.out.println("Response: " + t.getLastServerResponse());
                                  t.close();
                              FacesMessage fm = new FacesMessage("Mail has been sent successfully.");
                              fm.setSeverity(FacesMessage.SEVERITY_INFO);
                              FacesContext af = FacesContext.getCurrentInstance();
                              af.addMessage(null, fm);
                              System.out.println("\nMail was sent successfully.");
                              catch(Exception e){
                                  e.printStackTrace();
        return "Success";
        public String SendMail() {
           send(SMTPhost, From, To, Subject, Body, Attachment, Username, Password, Port,filename1);
            return null;
    But, it throws exception while sending with  attachments.
    java.io.IOException: No content
      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:930)
      at com.rits.suplr.view.backing.Mail.send(Mail.java:169)
      at com.rits.suplr.view.backing.Mail.SendMail(Mail.java:193)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
      at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
      at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
      at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Anyone Guide Me

  • Email with attachment doesn't work

    Hi all,
    I have a form in with i upload a file. On submit i send a mail with attach the file i uploaded. the form has as action a servlet.
    Well it works if i try it on the localhost, when i try it from my computer to the server the mail is sent but without the file attach.
    the code is the following:
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.*;
    import java.util.*;
    /public class SendMail
    String host ="" ;
    String from ="" ;
    String to ="";
    String subject ="";
    String body ="";
    String id ="";
    String filename ="" ;
    boolean add = false;
    boolean tosend = false;
    public SendMail(String h , String f)
         host = h;
         from = f;
    public void setTo(String to)
         this.to = to;
    public void setSubject(String obj)
         this.subject = obj;
    public void setBody(String body)
         if(add)
              this.body += body;
              add = false;
         else
              this.body = body;
    public void addToBody(String body)
         this.body += body;
    public boolean getContinue()
         return add;
    public void setContinue(boolean a)
         add = a;
    public String getBody()
         if(!add)
              return this.body;
         else
              return "";
    public boolean send()
         try
         //Get system properties
         Properties props = System.getProperties();     
         //Setup mail server
         props.put("mail.smtp.host", host);
         // Get session
         Session session = Session.getDefaultInstance(props, null);
         // Define message
         MimeMessage message = new MimeMessage(session);
                   // Set the from address
                   message.setFrom(new InternetAddress(from));
    //               Set the to address
    System.out.println("to = >" + to +"< body = "+ body);
         message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));
    //     Set the subject
         message.setSubject(subject);
    //     Set the content
         message.setText(body);
    // Send message
         // Transport.send(message);
    File file = new File(filename);
                   if (file.exists())
                        // create and fill the first message part
                        MimeBodyPart mbp1 = new MimeBodyPart();
                        mbp1.setText(body);
                        // create the second message part
                        MimeBodyPart mbp2 = new MimeBodyPart();
                        // attach the file to the message
                        FileDataSource fds = new FileDataSource(filename);
                        mbp2.setDataHandler(new DataHandler(fds));
                        mbp2.setFileName(fds.getName());
                        // create the Multipart and its parts to it
                        Multipart mp = new MimeMultipart();
                        mp.addBodyPart(mbp1);
                        mp.addBodyPart(mbp2);
                        // add the Multipart to the message
                        message.setContent(mp);
                   // send the message
                   Transport.send(message);
    return true;
    catch (AddressException e)
                   e.printStackTrace();
                   return false;
    catch (MessagingException e)
                   e.printStackTrace();
                   return false;
    catch (Exception e)
                   e.printStackTrace();
                   return false;
    Any help is appreciated.
    Thanks!

    Ok, I have made something similar to which your you want to do.
    Before to send a e-mail you have to upload the file, and later you can attach it into the e-mail.
    To upload the file:
    I made it with a jsp file (has a form) where I call to a java servlet how upload the file:
    package ServletUpload;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.text.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.commons.fileupload.*;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    public class uploadFichero extends HttpServlet {
        public void init(ServletConfig config) throws ServletException{
            super.init(config);
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("We began the processing of the file");
            boolean uploaded = false;
            uploaded = procesaFicheros(request,out);
            if (true==uploaded)
                out.println("File uploaded");
            else
                out.println("Error to upload File");
            out.println("</body>");
            out.println("</html>");
            out.close();
        public boolean procesaFicheros(HttpServletRequest req, PrintWriter out ) throws ServletException, IOException {
            try {
                boolean isMultipart = FileUpload.isMultipartContent(req);
                out.println ("<br>Is multipart:"+isMultipart);
                // Create a factory for disk-based file items
                FileItemFactory factory = new DiskFileItemFactory();
                // Create a new file upload handler
                ServletFileUpload upload = new ServletFileUpload(factory);
                // Set overall request size constraint
                upload.setSizeMax(1024*512); //524288 Bytes (512 KB)
                // Parse the request
                List items = upload.parseRequest(req);
                // Process the uploaded items
                Iterator iter = items.iterator();
                while (iter.hasNext()) {
                    FileItem item = (FileItem) iter.next();
                    if (!item.isFormField()) {  //Files to upload
                        String fieldName = item.getFieldName();
                        String fileName = item.getName();
                        String contentType = item.getContentType();
                        boolean isInMemory = item.isInMemory();
                        long sizeInBytes = item.getSize();
                        /* ************* FOR WINDOWS EXPLORER ****************** */
                        /* ************** FOR MOZILLA EXPLORER IS NOT NEED ****************** */
                        /* *********** We extract the name of the file ONLY the name *********** */
                            /*  We have the name into a string, We have the separated folders by the character \  */
                        int numbers=0;
                        for(int i=fileName.length();(i=fileName.lastIndexOf('\\',i-1))>=0;)
                            numbers++;
                            /* WE OBTAIN A STRING FOR EACH DIRECTORY And The FILE */
                        String stringFile[] = fileName.split("\\\\");
                        /* *********** We only extract the name of the file (END) *********** */
                        /* WE CREATED THE FOLDER IN CASE IT DOES NOT EXIST */
                        /* WE VERIFIED IF THE FOLDER EXISTS */
                        String folder = "yourFolderName";
                        String newUserFolder = folder;
                        File createFile = new File("routeOfYourFolder/"+newUserFolder);
                        /*  for example (in unix)
    File createFile = new File("/usr/local/tomcat/webapps/"+newUserFolder);
                        if (!createFile.exists()){ /* IT DOES NOT EXIST, WE CREATE IT */
                            createFile.mkdir();
                        /* WE VERIFIED IF THE FOLDER EXISTS (END) */
                        /* WE WROTE THE FILE (UPLOAD) IN THE CHOSEN FOLDER */
                        fileName = stringFile[numbers];
                        File uploadedFile = new File("routeOfYourFolder/"+newUserFolder+"/"+fileName);
                        item.write(uploadedFile);
                        /* WE WROTE THE FILE (UPLOAD) IN THE CHOSEN FOLDER (END) */
                    } else {        //THAT ARE THE OTHER FIELDS OF THE FORM
                        // s= item.toString();
                        // out.println("<br>isFormField: "+s);
            catch(Exception e) {
                out.println("ERROR IN THE APPLICATION " + e.getMessage());
            return true;
        public void destroy() {
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            processRequest(request, response);
        public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException {
              doGet(req,res);
    }  //END OF uploadFicheroI hope it helps you. you will tell me.

  • JavaMail hangs up does not send mail nor throws exception when sending with attachment.

    So basically i have a problem that has been reported, but none of the answers solved in my case.
    I'm trying to send a mail with attachment using java mail, and it hangs in the transport.Send without sending an exception.
    I've put the debug to true to try to understand what's going on and the result that i get is this:
    DEBUG: not loading system providers in <java.home>/lib
    DEBUG: not loading optional custom providers file: /META-INF/javamail.providers
    DEBUG: successfully loaded default providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.S  MTPSSLTransport,Sun Microsystems, Inc],  com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.
    SMTPTransport,Sun Microsystems, Inc],  com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLSto  re,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLSto re,Sun M
    icrosystems, Inc],  com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun   Microsystems, Inc],  com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun   Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol:   {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems,   Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems,   Inc], smtps=javax.mail.Provider[TRANSPORT,
    smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],  pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc],  pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems,   Inc], smtp=java
    x.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: not loading optional address map file: /META-INF/javamail.address.map
    i've tried set the both connection timeout proprieties to 5000 but it stil does nott generate an exception. i've tried to chage the try catch block to catch Exception rather than MessagingException but it still does not generate an exception.
    So i have another environment where using the same mail server and code it is working and i.ve generated the debug message and the next message is
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    I don't understand why it blocks here and why this message is not shown. i don't think its a connection problem. maybe a configuration issue, so i'm triyng to understand whats going wrong.
    Any help would be appreciated. Thanks.

    Based on the debug output, you're using a very old version of JavaMail.  You should consider upgrading.
    The debug output shows no attempt to connect to any server, so it appears that something is going wrong even before then.
    If the program is really blocked, try to get a stack trace showing where it's blocked.
    Also, try catching Throwable to make sure you're not missing some kind of unexpected failure.
    Do you have a standalone application, or is it running in some sort of application server?
    What version of the JDK are you using?

  • Web Service 2.0 add Activity with attachment

    I have a requirement, use Java code to add an activity with attachment using the wsdl of web service 2.0.
    However, I can't add attachment successfully.
    without any attachment, the activity can be added successfully in CRMOD.
    my soap msg without attachment is like "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"urn:crmondemand/ws/ecbs/activity/10/2004\" xmlns:data=\"urn:/crmondemand/xml/Activity/Data\"><soapenv:Header /><soapenv:Body><ns:ActivityInsert_Input><data:ListOfActivity><data:Activity><data:ServiceRequestNumber>85-3143833</data:ServiceRequestNumber><data:Description>at-test18</data:Description><data:Subject>AT18</data:Subject><data:Activity>Task</data:Activity></data:Activity></data:ListOfActivity></ns:ActivityInsert_Input></soapenv:Body></soapenv:Envelope>";
    in this case,I can found the new activity AT18 added in CRMOD.
    But, if I add attachment in my soap msg, such as
    "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"urn:crmondemand/ws/ecbs/activity/10/2004\" xmlns:data=\"urn:/crmondemand/xml/Activity/Data\"><soapenv:Header /><soapenv:Body><ns:ActivityInsert_Input><data:ListOfActivity><data:Activity><data:ServiceRequestNumber>85-3143833</data:ServiceRequestNumber><data:Description>at-test18</data:Description><data:Subject>AT18</data:Subject><data:Activity>Task</data:Activity><data:ListOfAttachment><data:Attachment><data:DisplayFileName>attachment.txt</data:DisplayFileName><data:FileNameOrURL>attachment</data:FileNameOrURL><data:FileExtension>txt</data:FileExtension><data:Description>Attachment Desc</data:Description><data:Attachment>dGVzdCBhdHRhY2htZW50</data:Attachment></data:Attachment></data:ListOfAttachment></data:Activity></data:ListOfActivity></ns:ActivityInsert_Input></soapenv:Body></soapenv:Envelope>";
    then I will get the error
    Update operation on integration component 'Activity' failed because no matching record in business component 'Action' with search specification '[Description] = "AT18"' could be found.(SBL-EAI-04403)
    I am not sure whats the reason....in the API document. It mentions for web service 2.0 'the Insert method can be used to insert both parent records and child records', and 'ActivityInsert' above is actually call the insert method, How I can insert both ativity and attachment successfully? Does anybody have some suggestions?
    Thanks in advance!
    Kane
    Edited by: user13108801 on 18-May-2010 20:05

    Thanks Dinesh,
    I am in Release 17, in R17, the InsertChild is not supported, API only support 'insert' for both parent and child.
    It looks the 'insert' operation with child record actually do the 'update' operation for the parent record to update its child node.
    if I send msg using insert operation like:
    "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"urn:crmondemand/ws/ecbs/activity/10/2004\" xmlns:data=\"urn:/crmondemand/xml/Activity/Data\"><soapenv:Header /><soapenv:Body><ns:ActivityInsert_Input><data:ListOfActivity><data:Activity><data:ServiceRequestNumber>85-3143833</data:ServiceRequestNumber><data:Description>at-test18</data:Description><data:Subject>AT18</data:Subject><data:Activity>Task</data:Activity><data:ListOfAttachment><data:Attachment><data:DisplayFileName>attachment.txt</data:DisplayFileName><data:FileNameOrURL>attachment</data:FileNameOrURL><data:FileExtension>txt</data:FileExtension><data:Description>Attachment Desc</data:Description><data:Attachment>dGVzdCBhdHRhY2htZW50</data:Attachment></data:Attachment></data:ListOfAttachment></data:Activity></data:ListOfActivity></ns:ActivityInsert_Input></soapenv:Body></soapenv:Envelope>";
    it will failed with the error msg I mentioned before.
    however, if I create the parent node first:
    "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"urn:crmondemand/ws/ecbs/activity/10/2004\" xmlns:data=\"urn:/crmondemand/xml/Activity/Data\"><soapenv:Header /><soapenv:Body><ns:ActivityInsert_Input><data:ListOfActivity><data:Activity><data:ServiceRequestNumber>85-3143833</data:ServiceRequestNumber><data:Description>at-test18</data:Description><data:Subject>AT18</data:Subject><data:Activity>Task</data:Activity></data:Activity></data:ListOfActivity></ns:ActivityInsert_Input></soapenv:Body></soapenv:Envelope>";
    and then still use insert operation to add the activity with a attachment:
    "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"urn:crmondemand/ws/ecbs/activity/10/2004\" xmlns:data=\"urn:/crmondemand/xml/Activity/Data\"><soapenv:Header /><soapenv:Body><ns:ActivityInsert_Input><data:ListOfActivity><data:Activity><data:ServiceRequestNumber>85-3143833</data:ServiceRequestNumber><data:Description>at-test18</data:Description><data:Subject>AT18</data:Subject><data:Activity>Task</data:Activity><data:ListOfAttachment><data:Attachment><data:DisplayFileName>attachment.txt</data:DisplayFileName><data:FileNameOrURL>attachment</data:FileNameOrURL><data:FileExtension>txt</data:FileExtension><data:Description>Attachment Desc</data:Description><data:Attachment>dGVzdCBhdHRhY2htZW50</data:Attachment></data:Attachment></data:ListOfAttachment></data:Activity></data:ListOfActivity></ns:ActivityInsert_Input></soapenv:Body></soapenv:Envelope>";
    then, the attachment will be added successfully.
    And I searched API document of Release 17, it mention that 'The Insert method can be used to insert both parent records and child records. If a child node is specified in the request, the Insert method inserts the child and associates it with the existing parent record. If a child node is missing, the Insert call inserts only the new parent record.'
    So, is it that we can say the Insert method for child node can success only if the parent node is already existed? seems we can not insert both parent and child at one time.
    Thanks
    Kane

  • Send mail with attachment from the uploaded file

    hi,
    From a form thread i got the following code to send mail with attachment with the file uploaded from the file upload ui element.
    public void onActionLoadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionLoadFile(ServerEvent)
         WDWebResourceType FileType = null;
         String FileName = new String();
              //get attribute info for context attribute 'FileUpload'
              IWDAttributeInfo attributeInfo =
                   wdContext.getNodeInfo().getAttribute(
                        IPrivateEmailView.IContextElement.FILE_UPLOAD);
              //get modifiable binary type from the attribute info,requires type cast.
              IWDModifiableBinaryType binaryType =
                   (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();
              IPrivateEmailView.IContextElement element =
                   wdContext.currentContextElement();
              //if a file in the 'FileResource' attribute exists
              if (element.getFileUpload() != null) {
                   try {
                        String mimeType = binaryType.getMimeType().toString();
                        byte[] file = element.getFileUpload();
                        //get the size of the uploaded file
                        element.setFileSize(this.getFileSize(file));
                        //get the extension of the uploaded file
                        element.setFileExtension(binaryType.getMimeType().getFileExtension());
                        //NOTE: context attribute 'FileName' must not be set
                        //because the FileUpload-UI-element property 'fileName'
                        //is bound to it. Consequently the fileName is automatically
                        //written to the context after file upload.
                        //report success message
                        wdComponentAPI.getMessageManager().reportMessage(
                        IMessageEmailComp.SF_UPLOAD,
                             new Object[] { binaryType.getFileName()},
                             false);
                        FileType = binaryType.getMimeType();
                        FileName = binaryType.getFileName();
                   } catch (Exception e) {
                        throw new WDRuntimeException(e);
              //if no file in the 'FileResource' attribute exists
              else {
                   //report error message
                   IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                   msgMgr.reportContextAttributeMessage(
                        element,
                        attributeInfo,
                        IMessageEmailComp.NO_FILE,
                        new Object[] { "" },
                        true);
              //clear the FileResource context value attribute
              //element.setFileUpload(null);
              String URL;
              URL = this.CreateAndGetPathFileUpload(
                                  wdContext.currentContextElement().getFileUpload(),
                                                      FileName);
    //          if (URL.length() == 1){
    //               //ERRORE
         wdContext.currentContextElement().setPATHFileUploaded(URL);
        //@@end
      public boolean send( java.lang.String subj, java.lang.String mess, java.lang.String dest, java.lang.String attach, java.lang.String FileName )
        //@@begin send()
         InitialContext ctx = null;
         Address[] address = null;
         Message msg = null;
         Session sess = null;
         MimeBodyPart bodyPart = null;
         Multipart mp = null;
         // "141.29.193.71" == milvl2ja.icn.siemens.it (SMTP di Siemens)
           try {
              Properties props = new Properties();
              props.put("domain","true");
              ctx = new InitialContext(props);
              sess = (Session) ctx.lookup("java:comp/env/mail/MailSession");
              msg = new MimeMessage(sess);
              IWDClientUser utente = WDClientUser.getCurrentUser();
              String senderEmail = utente.getSAPUser().getEmail();
              InternetAddress addressFrom = new InternetAddress(senderEmail);
              msg.setFrom(addressFrom);     
              String EmailDEST = dest;
              InternetAddress addressTo = new InternetAddress(EmailDEST);
              msg.setRecipient(Message.RecipientType.TO, addressTo);
              msg.setSubject(subj);
    //          if ((mess != null) && (mess.length()>0)) {
    //                 msg.setContent(mess, "text/plain");
    //            } else {
    //                 msg.setContent("", "text/plain");
              //Gestione ATTACHMENT...
              String attachedFileName = new String(wdContext.currentContextElement().getFileName());
              boolean hasAttachment = (attachedFileName != null) && (attachedFileName.length() > 0);
              boolean isMultiPart = (mess != null) && (mess.length() > 1);
              //adding an attachment makes the message multipart
                 if (isMultiPart || hasAttachment) {
                    mp = new MimeMultipart();
                    // add text parts
                      if (mess != null) {
                         for (int i = 0; i < mess.length(); i++) {
                           bodyPart = new MimeBodyPart();
                           bodyPart.setContent(mess,"text/plain");
                           mp.addBodyPart(bodyPart);
                    //attach the file to the message if needed
                    if (hasAttachment) {     // avoid the case with no text parts
                         bodyPart = new MimeBodyPart();
                           bodyPart.setContent("Allegato incluso nel messaggio.","text/plain");
                           mp.addBodyPart(bodyPart);
                           // the part with the file
                           FileDataSource fds = new FileDataSource(attach);
                           MimeBodyPart attachmentBodyPart = new MimeBodyPart();
                        attachmentBodyPart.setDataHandler(new DataHandler(fds));
                        //URL URLattachedFileName = new URL(attach);
                        //attachmentBodyPart.setDataHandler(new DataHandler(URLattachedFileName));
                           attachmentBodyPart.setFileName(FileName);
                           mp.addBodyPart(attachmentBodyPart);
                    msg.setContent(mp);
                 } else {
                    if ((mess != null) && (mess.length() > 0)) {
                         msg.setContent(mess, "text/plain");
                    } else {
                         msg.setContent("", "text/plain");
              //fine ATTACHMENT 
              msg.setSentDate(new GregorianCalendar().getTime());
              msg.saveChanges();
              address = msg.getAllRecipients();
              Transport.send(msg, address);
           } catch (Exception e) {
                 e.printStackTrace();
                 return false;
           return true;
        //@@end
    When i used the same code in my application i am gett ing error in many places..
    1)FileDataSource fds = new FileDataSource(<b>attach</b>);
    attach cannot be resolved
    2)attachmentBodyPart.setFileName(<b>FileName</b>);
    fliename cannot be resolved
    3)byte[] file = element.getFileUpload();
    type mismatch cannot convert sting to byte[]
    4)element.setFileSize(this.getFileSize(file));
    method getFileSize() is undefined
    5)element.setFileExtension(binaryType.getMimeType().getFileExtension());
    method getFilExtension() is undefined
    6)URL = this.CreateAndGetPathFileUpload(wdContext.currentContextElement().getFileUpload(),FileName);
    method CreateAndGetPathFileUpload() is undefined.
    7)wdContext.currentContextElement().setPATHFileUploaded(URL);
    from the above error i can understand that only i have got the part of the code.
    Please send me the complete coding.
    some method definitions are missing....
    Please help me to send the mail with attachment from the file uploaded from the file upload ui element.
    Thanks in advance,
    shami.

    hi,
    I got this from the following link
    Re: Attaching an excel file
    plz help me ...
    I am using 2004s with nwds 7.0.06.
    also tell me what should be the type of the context variable FileUpload
    Thanks in advance,
    shami.

  • Receiving email with attachment in database.

    Hi,
    Can anybody tell me if it is possible to poll an email
    account (eg [email protected]) for emails with attached
    XML files (1 file per mail) and to detach/read the attached XML file,
    Thanks,
    john

    I don't believe there's any packaged way of doing this at the moment. The UTL_SMTP is only capable of sending e-mail.
    You might be able to write something using UTL_TCP, but that's kind of low level. Alternatively, you might be able to do something by wrapping some JavaMail stuff in a Java Stored Procedure. Sorry I can't be any more concrete.
    Cheers, APC

Maybe you are looking for

  • Acrobat Pro 9.0 Adding Spaces

    I'm converting Word 2007 documents with file extensions of .doc to a single PDF in Acrobat Pro 9.0.  After the conversion, there are extra spaces added throughout the document between words and even within words themselves.  I'm not sure what's causi

  • Fixed vendor Info record price report

    Hi, Is there any SAP report which can only show me the current info record price for multiple materials for their respective fixed vendors? Sincerely, Puja

  • How to populate dynamic internal table according to the field names

    Hi ,       Iam having a dynamic internal table <DYN_TABLE> , it has fields like MATNR   MAKTX       MEINS    BISMT     MTART  ... Now my requirement is i need to fill them according to the fieldname from another internal table (static) . The order of

  • Question about Load Balancing Wireless connections using WLC- F5- ISE

    Hi all, Can anyone give me some orientation how the radius auth process/handshake between the WLC and ISE changes once the F5 is installed in the middle in order to perform load balancing? We can do some kind of load balancing by configuring differen

  • Windows Vista Adobe Reader X

    Hallo, Kann mir jemand helfen oder einen Tipp geben. Das Programm Adobe Reader wird von der Ausführungsverhinderung (Windows Vista SP2) blockiert. Meldun: Sie können die Ausführungsverhinderung für dieses Programm nicht einschalten. Danke Tristan 17