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

                    Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

                    Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

                    2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived