I have Mail with “Click to Download Invoice” link But I want this PDF As a attachment in my Mail. Using Springboot Java [on hold]2019 Community Moderator ElectionDownload attachments using Java MailSending Email in Android using JavaMail API without using the default/built-in appSend Email IntentUnable to download PDF attachment with java by using JavaMailDownloading Java JDK on Linux via wget is shown license page insteadSending mail attachment using Javajava mail Api want to show attachment linkjava mail download link for attachmentAttachment downloaded in “File” format instead of pdfHow to attach invoice PDF instead of packing slip in magento 2

Power Strip for Europe

How does Ehrenfest's theorem apply to the quantum harmonic oscillator?

After `ssh` without `-X` to a machine, is it possible to change `$DISPLAY` to make it work like `ssh -X`?

How do electrons receive energy when a body is heated?

Can the alpha, lambda values of a glmnet object output determine whether ridge or Lasso?

Can I negotiate a patent idea for a raise, under French law?

Doubts in understanding some concepts of potential energy

Does an unused member variable take up memory?

What will happen if my luggage gets delayed?

Specifying a starting column with colortbl package and xcolor

Why do we say ‘pairwise disjoint’, rather than ‘disjoint’?

How can I manipulate the output of Information?

What is better: yes / no radio, or simple checkbox?

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

Finitely many repeated replacements

Signed and unsigned numbers

How many characters using PHB rules does it take to be able to have access to any PHB spell at the start of an adventuring day?

Why is a very small peak with larger m/z not considered to be the molecular ion?

Are all players supposed to be able to see each others' character sheets?

Which situations would cause a company to ground or recall a aircraft series?

Why do phishing e-mails use faked e-mail addresses instead of the real one?

Recommendation letter by significant other if you worked with them professionally?

Is this Paypal Github SDK reference really a dangerous site?

From an axiomatic set theoric approach why can we take uncountable unions?



I have Mail with “Click to Download Invoice” link But I want this PDF As a attachment in my Mail. Using Springboot Java [on hold]



2019 Community Moderator ElectionDownload attachments using Java MailSending Email in Android using JavaMail API without using the default/built-in appSend Email IntentUnable to download PDF attachment with java by using JavaMailDownloading Java JDK on Linux via wget is shown license page insteadSending mail attachment using Javajava mail Api want to show attachment linkjava mail download link for attachmentAttachment downloaded in “File” format instead of pdfHow to attach invoice PDF instead of packing slip in magento 2










-1















I am Creating a Link and attaching that to Email as Click to download Button but Now I want to Attach that PDF in Email Instead of Click to Download.










share|improve this question













put on hold as unclear what you're asking by Scary Wombat, Dale Burrell, Vogel612, Gilles Gouaillardet, Pablo Cegarra Mar 7 at 6:52


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






















    -1















    I am Creating a Link and attaching that to Email as Click to download Button but Now I want to Attach that PDF in Email Instead of Click to Download.










    share|improve this question













    put on hold as unclear what you're asking by Scary Wombat, Dale Burrell, Vogel612, Gilles Gouaillardet, Pablo Cegarra Mar 7 at 6:52


    Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.




















      -1












      -1








      -1








      I am Creating a Link and attaching that to Email as Click to download Button but Now I want to Attach that PDF in Email Instead of Click to Download.










      share|improve this question














      I am Creating a Link and attaching that to Email as Click to download Button but Now I want to Attach that PDF in Email Instead of Click to Download.







      java spring-boot email email-attachments






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 5:07









      ukdevukdev

      13




      13




      put on hold as unclear what you're asking by Scary Wombat, Dale Burrell, Vogel612, Gilles Gouaillardet, Pablo Cegarra Mar 7 at 6:52


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









      put on hold as unclear what you're asking by Scary Wombat, Dale Burrell, Vogel612, Gilles Gouaillardet, Pablo Cegarra Mar 7 at 6:52


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Nothing specific to spring-boot here.



          You can attach pdf to email and for that you need 2 MimeBodyParts, one for the main message body and one for the attached file:



           Multipart multipart = new MimeMultipart();
          MimeBodyPart messageBodyPart = new MimeBodyPart();
          String message = "file attached. ";
          messageBodyPart.setText(message, "utf-8", "html");
          multipart.addBodyPart(messageBodyPart);

          MimeBodyPart attachmentBodyPart = new MimeBodyPart();
          attachmentBodyPart.attachFile(new File(filePath+"/"+fileName), "application/pdf", null);
          multipart.addBodyPart(attachmentBodyPart);
          mail.setContent(multipart);





          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Nothing specific to spring-boot here.



            You can attach pdf to email and for that you need 2 MimeBodyParts, one for the main message body and one for the attached file:



             Multipart multipart = new MimeMultipart();
            MimeBodyPart messageBodyPart = new MimeBodyPart();
            String message = "file attached. ";
            messageBodyPart.setText(message, "utf-8", "html");
            multipart.addBodyPart(messageBodyPart);

            MimeBodyPart attachmentBodyPart = new MimeBodyPart();
            attachmentBodyPart.attachFile(new File(filePath+"/"+fileName), "application/pdf", null);
            multipart.addBodyPart(attachmentBodyPart);
            mail.setContent(multipart);





            share|improve this answer



























              0














              Nothing specific to spring-boot here.



              You can attach pdf to email and for that you need 2 MimeBodyParts, one for the main message body and one for the attached file:



               Multipart multipart = new MimeMultipart();
              MimeBodyPart messageBodyPart = new MimeBodyPart();
              String message = "file attached. ";
              messageBodyPart.setText(message, "utf-8", "html");
              multipart.addBodyPart(messageBodyPart);

              MimeBodyPart attachmentBodyPart = new MimeBodyPart();
              attachmentBodyPart.attachFile(new File(filePath+"/"+fileName), "application/pdf", null);
              multipart.addBodyPart(attachmentBodyPart);
              mail.setContent(multipart);





              share|improve this answer

























                0












                0








                0







                Nothing specific to spring-boot here.



                You can attach pdf to email and for that you need 2 MimeBodyParts, one for the main message body and one for the attached file:



                 Multipart multipart = new MimeMultipart();
                MimeBodyPart messageBodyPart = new MimeBodyPart();
                String message = "file attached. ";
                messageBodyPart.setText(message, "utf-8", "html");
                multipart.addBodyPart(messageBodyPart);

                MimeBodyPart attachmentBodyPart = new MimeBodyPart();
                attachmentBodyPart.attachFile(new File(filePath+"/"+fileName), "application/pdf", null);
                multipart.addBodyPart(attachmentBodyPart);
                mail.setContent(multipart);





                share|improve this answer













                Nothing specific to spring-boot here.



                You can attach pdf to email and for that you need 2 MimeBodyParts, one for the main message body and one for the attached file:



                 Multipart multipart = new MimeMultipart();
                MimeBodyPart messageBodyPart = new MimeBodyPart();
                String message = "file attached. ";
                messageBodyPart.setText(message, "utf-8", "html");
                multipart.addBodyPart(messageBodyPart);

                MimeBodyPart attachmentBodyPart = new MimeBodyPart();
                attachmentBodyPart.attachFile(new File(filePath+"/"+fileName), "application/pdf", null);
                multipart.addBodyPart(attachmentBodyPart);
                mail.setContent(multipart);






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 7 at 5:11









                AlienAlien

                5,25431127




                5,25431127















                    Popular posts from this blog

                    Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

                    Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

                    How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page