Email Attachement using mail api

Hi to All,
Hi i am using mail api for my project with Eclipse in Window xp.I have two doubts .
1. I want to download attachment with out using file concept.Can i download the attachement
2.Here i am having attachment in my mail .I want to forward the attachement with out attache again.
can u help me..
Thanks...

Hi Gandalf,
I picked up your code and ran it, couple of things, firstly windows and Unix line terminations are different so in your method doCommand use "\r\n" not just \n, this will give a full <CRLF>
On you initial HELO you want to use your computer's id as part of the command so use this line:
sender_domain = InetAddress.getLocalHost().getHostName();
String s1 = new String("HELO " + sender_domain);
s1.trim();
response = doCommand(s1);
Cheers
Dom

Similar Messages

  • I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    It will time out, if it hasn't already. Delete the message from the Outbox.

  • Send PDF as email attachment using Outlook 2011 ERROR

    Every time I try to send a PDF as an email attachment, I get the following error:
    "An error occurred while trying to create a mail document.  Acrobat is unable to complete your request."
    Prior to getting this error, every time I sent an email Adobe would open the default Mail program on the mac. I  opened mail and changed the preference to use Outlook 2011 as the default mail program, but this did not correct the error.
    Any ideas?
    Thanks!

    AmbooS wrote:
    This is a known issue with Mac Outlook 2011 which is an unsupported version for Acrobat X. This will be supported in the next release.
    If adobe was smart it would be added in the update rather than in than in AcrobatXI  And while at it they need to add support for SeaMonkey and Thunderbird as well.  You've been ingnoring of Dissing Mozilla Products since OSX has been out.

  • Still failed to read email attachment, both Mail and Enturoge

    I can't open email attachments (tif and jpg) after installation of OS X 10.6 by using Mail.
    I today installed MS Enturoge but still having same problem as Mail.
    Can Apple tell me why? And how to solve this problem?

    Alex,
    Yes, the inbound mail attachment is supported in B2B PS3 (11.1.1.4.0) but you cannot send both attachment and body to a JMS queue simultaneously from B2B. Body will be passed to the JMS queue and attachment will be written to the b2b.attachments.dir (set as B2B property in EM console) -
    http://docs.oracle.com/cd/E23943_01/user.1111/e10229/app_isags.htm
    Regards,
    Anuj

  • Random email attached to mail

    I  just sent an email to someone - it was a brand new email not a reply. It had four attachments (screenshots) which I dragged into the mail from the desktop, When I looked at what I'd sent I saw that it had a second mail attached to the bottom of it, one that I had sent to someone else months ago. Why has this happened? Could be very awkward Now I'm worried that whatever I send will have some random second email attached...
    I'm using 10.8.3 and Mail 6.3

    From your further explanations it sounds like your system sent two separate emails. This is what I think you have said:
    You sent one email that you meant to send and it had an attachment you meant to attach.
    An additional email got sent. We don't know why. It is a random email from December that got forwarded to the same recipient as the email you meant to send. And it is being arranged or colored in the list of emails as if it is related to the one you meant to send.
    Is that correct?
    I can't think of a way this could have happened. I'm just trying to nail down the problem so that when someone else comes around they'll know what the problem was.

  • Sending Formated email content using Mail Adapter !

    Hi,
    I would like to send email notification to customer using mail adapter, could you please to advise how to prepared the content of the email with little bit formated like sample below :
    Dear Madam / Sir
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxx :
    yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
    Best Regards,
    Since the constant function only can accept single line, how i can add change line.
    thank you and Best Regards
    Fernand

    Hi Fernand,
    There are a couple of blogs in SDN regarding sending formatted mail using Mail adapter. I guess there is one written by Prakash Arunachalam. Just do a search and it will give you some idea on using XSLT to achieve the result.
    If all you need is multi line in the content, use a UDF and use \n when ever you need a new line and \t for tab space.
    Regards,
    Jaishankar

  • Send pdf (Adobe Form) as email attachment using BCS

    Hello everybody!
    I want to send a pdf, generated by Adobe Forms function module, as an email attachment to a certain external mail receiver. I have read that the methods of the Business Communication Services can render this, but I couldn't create a working solution. Can somebody give me a coding example for this scenario?
    I would be very happy if somebody could help me!
    Best regards,
    Markus

    Hello Alex!
    your link to this document was very helpful. The scenario described in the pdf is almost what I was looking for. The only problem is, that the mail is sent to the Business Workplace Inbox. I want to send it to an external e-mail address. When I change the programm part where the recipient is defined like this:
    Create recipient
      DATA lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      DATA l_reci    TYPE adr6-smtp_addr VALUE 'somemailaddress'.
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_reci ).
    Set sender
      lo_send_request->add_recipient(
        EXPORTING
          i_recipient = lo_recipient ).
    then no mail is sent to the recipients mailbox. I tried several variants but no mail is sent. Does somebody know how to set an external e-mail as recipient in this case?
    Best regards!
    Markus

  • Delayed email delivery using mail app in Lion

    I'm having issues with delayed email delivery using the mail app in Lion. Specifically I have an IMAP account (AOL) that is working fine on other macs running snow leopard and on both an iPhone and an iPad. I receive an email that shows up on all other devices but does not get delivered on the Macbook Air. Clicking get new messages does not delivery the email, even if other emails have been delivered in the interim. The only way to get the email to show up is to exit Mail and restart it - and then the email shows up, in the correct date/time order and the correct read status (since I had already read it on another device).
    This has happened twice now with my AOL account in the past 24 hours (I've only had the new Macbook Air since Monday). It might also be happening on my other IMAP email accounts but I have not noticed it yet. It's intermittant as I've received many other emails correctly and ontime.
    Anyone else seeing something similar? I've never seen this with earlier versions of Mac OS X or on devices running iOS.
    This is a Macbook Air running Lion 10.7.1. I have 4 IMAP accounts set up. Mail is set to check for email once a minute and I have my IMAP accounts set to use the IDLE command.

    I have the same problem, some photos are not loaded completely and partly grey. This occurs only in Mail.app but not in the web interface of the email provider. Did you find a solution, Florian? Does somebody else have a suggestion?
    Greetings from Finland

  • Sending email attachements using unix !!

    hi
    I want to send report generated my spooled file as attachment using unix shell script.
    Can somebody help me out ?
    many thanks

    Nothing to do with PL/SQL.
    Anyway, here's a snippet from a Unix shell script I wrote that does notification (via various methods). The code snippet is from the part where an e-mail with attachment is created for the Unix mail command. The variable names are (I hope) self explanatory.
    <font color="blue">
    ConstructMail()
      # do we have an attachment and does the file exist?
      if  [ "$ATTACHMENT" != "" ] && [ ! -f $ATTACHMENT ]
      then
        Abort "Error. File [$ATTACHMENT] not found."
      fi
      # create the boundary tags for the attachment
      if [ "$ATTACHMENT" != "" ]
      then
        BASE=`basename ${ATTACHMENT}`
        BOUNDS1="-"`hostname`.`date +%y%m%d%H%M`.$$
        BOUNDS2="--"$BOUNDS1
      fi
      # now we construct a MIME e-mail that includes boundaries for e-mail
      # attachments
      echo "To: $EMAIL_RECIPIENT"                              >> $LETTER
      echo "Subject: $SUBJECT"                                    >> $LETTER
      echo "MIME-Version: 1.0"                                    >> $LETTER
      if  [ "$ATTACHMENT" = "" ]
      then
        echo "Content-Type: Text/plain; charset=US-ASCII"           >> $LETTER
      else
        echo "Content-Type: Multipart/Mixed; Boundary=\"$BOUNDS1\"" >> $LETTER
        echo ""                                                     >> $LETTER
        echo "$BOUNDS2"                                             >> $LETTER
        echo "Content-Type: Text/plain; charset=US-ASCII"           >> $LETTER
      fi
      # now let's add the message's text body
      if [ -f $LETTER_BODY ]
      then
        cat $LETTER_BODY                                            >> $LETTER
      else
        Abort "Error. Letter body [$LETTER_BODY] not found!"
      fi
      # if we have an attachment, let's add it now
      if  [ "$ATTACHMENT" != "" ]
      then
        echo "$BOUNDS2"                                                   >> $LETTER
        echo "Content-Type: Text/plain; charset=US-ASCII; name=\"$BASE\"" >> $LETTER
        cat ${ATTACHMENT}                                                 >> $LETTER
      fi
    </font>The only real complexity is creating the boundary tags between attachment and the mail body - and of course specifying the correct e-mail headers so that the mail reader will know what is what.
    The above code creates a $LETTER file and this is then simply e-mailed using the Unix mail command, e.g.
    /usr/bin/mail $RECIPIENT < $LETTER
    More details in RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. http://www.faqs.org/rfcs/rfc2045.html

  • Help trying to send a big email shot using mail

    I am a small business and we have about 3,000 email contacts on our books. Occasionally we like to send them an email to show offers etc. Can anyone let me know the best way i could do this? at the moment my broadband supplier only allows me to send 20 emails at a time so i takes me forever to get through 3,000! On my old PC i used to be able to do an email mail merge via excel straight to outlook so after a few clicks it would automatically send to every customers individually so i could just leave it for 30 mins or so and it would be complete!
    Is there anyway i can do the same using mail? i am happy to use either excel or numbers to obtains this!
    Thanks in advance
    Andy

    I use .mac and can send as many emails as I want.
    You just use Apple Mail set up with your .Mac account as outgoing mail server.
    This way you never have to worry who your ISP is or what they allow you to do.
    That's my suggestion.
    BTW... Your question should really be posted in the Mail forum. Just so you know.
    Adam

  • Send Email issue using "Mail Server Load balancer"  (Cisco ACE 20)

    I have asked this question in SAP MII forum too but it appears issue could be in NetWeaver Mail API. Please let me know if someone have experienced this kind of issue or any suggestions.
    The send email action was working file in MII with smtp mail server on port 25. Recently basis did a change in mail server ip address and they installed a new Load Balancer . The Load balancer is between SMTP and MII. After this change MII does not send email (unknown source error). now MII send email action has ip address or qualified path of Load balancer in MII send email configuration instead of direct ip address of SMTP server. Below is the error message in Net Weaver logs.
    MII still sends email if direct ip address of email server  provided instead of Email Load balancer but not through Load balancer .
    Any suggestions ?
    Could not authenticate mail account (Unknown Source)
    [EXCEPTION]
    javax.mail.AuthenticationFailedException
    at javax.mail.Service.connect(Service.java:319)
    at javax.mail.Service.connect(Service.java:169)
    at javax.mail.Service.connect(Service.java:118)
    at com.sap.xmii.storage.connections.MailConnection.sendMail(MailConnection.java:202)
    at com.sap.xmii.bls.executables.actions.mail.MailActions.send(MailActions.java:223)
    at sun.reflect.GeneratedMethodAccessor1412.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at com.sap.xmii.bls.engine.ReflectiveAction.doExecute(ReflectiveAction.java:747)
    at com.sap.xmii.bls.engine.BaseNode.executeNode(BaseNode.java:198)
    at com.sap.xmii.bls.engine.BaseAction.execute(BaseAction.java:76)
    at com.sap.xmii.bls.engine.runners.ProductionRunner.runAction(ProductionRunner.java:147)
    at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:50)
    at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:126)
    at com.sap.xmii.bls.executables.controls.Switch.doExecute(Switch.java:131)
    at com.sap.xmii.bls.engine.BaseNode.executeNode(BaseNode.java:198)
    at com.sap.xmii.bls.engine.BaseControl.execute(BaseControl.java:127)

    Hi Ahmed,
    I don't have experience with Blackberry, but, as the document mentions, the first thing to do would be making sure that the connection timeout  is set to something high enough
    You can find more details on how to modify this value at the link below:
    http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA2_3_0/configuration/security/guide/tcpipnrm.html#wp1074289
    I hope this helps
    Daniel

  • Sending File as attachment using Mail adapter with naming convention

    Dear All,
    I am working on a scenario in which my sender file adapter is sending one file named 'ABC.ok' in one of the folders in application server. I have to send the same file with the same name  to one of the folders at FTP and also to my customer at his email id.
    I have used File Content onversion at the receiver side and has selected adapter specific attributes due to which the required file is getting generated at FTP folder with the same name as that of the source. But how to send the same file using the mail adapter by keeping same name as "ABC.ok". Kindly guide me out in this.
    Regards,
    NJ

    what you need to do:
    1) Select ASMA in Sender and receiver File CC...already done
    2) Using the Dynamic Config UDF get the sender file name in the field Content-Type...for this you need to have a return statement in your UDF
    3) now before pushing this file name to the Content-Type you have to append (concat)the actual type of the file content (xml, txt)
    so your entire Content-Type node will have something like text/plain; name="abc.ok"
    SAP Note has reference on how to do this:
    https://service.sap.com/sap/support/notes/856599
    From the note:
    Q: How can I set the file name of a mail attachment?
    Regards,
    Abhishek.

  • How do I open a TIF image email attachment using windows photo gallery as the default instead of microsoft office picture manager?

    I have an internet fax program that sends faxes directly to my email as a TIF image attachment. When I download the attachment it lists Microsoft office picture manager as the default program to view the image. I would like to change the default program to view the image to Microsoft photo gallery. How do I change the default program to open an image attachment in firefox? Thank you

    OK I have it figured out! I was using google mail. For what ever reason the imac/pc safari using google would not display the PDF in the email even though the ipad/iphone did. I tried a different mail system through work (not google mail) and it EVERYTHING works GREAT!!!!! Wow, a lot of wasted time over something that was actually working.

  • Problem: Error while sending Email.(Java Mail API)

    Hi to ALL
    I am trying to build Application to send Email
    Below code is primary code to send Email to other smtp host.
    & also debug information is as shown below.
    If possible, then please send the solution.
    -------------------------------Code :-----------------------------------------
    URLName urlN=new URLName("smtps://"+userNm+":"+passwd+"@"+host);
    Properties props = System.getProperties();
    Session session = Session.getDefaultInstance(props);
    session.setDebug(true);
    Message msg = new MimeMessage(session);
    msg.setFrom(new InternetAddress(from));
    InternetAddress[] address= InternetAddress.parse(to, false);
    msg.setRecipients(MimeMessage.RecipientType.TO, address);
    msg.setSubject("subject");
    msg.setContent("messageSend Hi", "text/plain");
    Transport transport=session.getTransport(urlN);
    transport.connect();
    transport.sendMessage(msg, address);
    ---------- Java Run ----------
    DEBUG: setDebug: JavaMail version 1.3.2
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "hostName", port 465, isSSL true
    220 smtp110.mail.mud.yahoo.com ESMTP
    DEBUG SMTP: connected to host "hostName", port: 465
    EHLO patil
    250-smtp110.mail.mud.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    250 8BITMIME
    DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XYMCOOKIE"
    DEBUG SMTP: Found extension "PIPELINING", arg ""
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<from email address>
    530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
    com.sun.mail.smtp.SMTPSendFailedException: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1275)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:895)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:524)
    at SendEmail2.<init>(SendEmail2.java:46)
    at SendEmail2.main(SendEmail2.java:23)
    Exception : com.sun.mail.smtp.SMTPSendFailedException: 530 authentication required - for help go to
    http://help.yahoo.com/help/us/mail/pop/pop-11.htmls
    -------------------------------------------------------------------------------------

    It's possible. It's only software, after all.
    But it's not easy. It effectively involves
    screen scraping the HTML pages.
    There used to be a third party JavaMail provider
    that did all the hard work, but it has disappeared.

  • How do I edit the picture that appears in the header of emails sent using Mail on my Mac?

    Each time I send an email Mail inserts a picture in the header. How do I edit what picture appears there? I found where I can change the picture for the account I use to log into the computer. However I have four email accounts.

    KT I figure this one out after I posted. However, I have three more email accounts and they are getting a picture as well. How do I fix those?

Maybe you are looking for

  • How can i use my led tv as a monitor for my macbook?

    hi everybody, I have a macbook and i'd like to use one of my tvs as a monitor, I have a Samsung led tv and a Philips 3d led tv but with the "mini display port to hdmi adapter" I'm not able to use my tv as a monitor for my macboo, is it possible or I

  • Itunes locking up when ipod is connected.  Firewall problem?

    Hi folks. For years I have been running itunes, an ipod touch and NOD32 firewall with no problems at all. But a couple of days ago I connected up my ipod and there is a problem. itunes launches as you would expect, but it immediately hangs. After a f

  • I just got a new i-touch. i am unable to set it up. please help

    Hi All I just got a new itouch. To set it up, i downloaded the latest itunes and connected the ipod to my machine. Follwoing the instructions, i clicked on (Connect to itunes) on the ipod. The ipod got detected in itunes but i am unable to proceed. T

  • Dynamic image in table  in adobe PDF form

    Hi experts                 I have been using a table in interactive form . In table I have a image field in which I want to insert employee pic which is comming in table as a URL . I have craeted a image field and attached tha table field to it but i

  • Smart Playlists w/"Date modified" not syncing to iPhone/iPad

    I'm posting this to the iTunes forum, because after a few months there's been no answer in the iPhone forum. User "kylerrs" found this first: kylerrs wrote: Okay, so I normally have a custom made smart playlist which I name "Recently Modified" so I c