I have the following error: Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Modules activation and java.activation export package javax.activation to module org.jetbrains.annotations Even though I have the following dependencies: com.sun.activation javax.activation 1.2.0
hey i like your video. this code run can run local machine very well but if your server ip is different then you stuck even you can make security low still it wont work. can you come up solution of that. also please when u doing please check another case after 10 min are you still able to send mail. thanks..
Thanks for liking the video . I am able to send emails at anytime using this code..never found any issues with that . Also, if you make changes in gmail security and allow it to get accessed by low security apps and remove 2-way authentication.. it should work
@@CodeTechGyan ok can you please make another video to host this app in vps/server(linux) and send mail back to you. and during that please show IP address of yours and server IP. Hope it will clear doubts.
You can change the body part with this code : MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setText(emailBody, "UTF-8","plain"); I hope this works for you 😉
I figured out that throwing the exceptions is one of the problems I'm having and it says it can't initialize the main class. Do you have any suggestions?
Looks like email subject and body is not being added properly to the multipart object.can you compare your code to the git code I provided. Check video description for git link.
I have one doubt here and in general too, How you create an instance of an object without using the keyword “new” for example Transport object here? Without the “new” keyword, Java cannot make a new instance of the object in heap memory, right!
You can get an object from connection factory. In this example newSession is a connection factory and getTransport() is used to fetch a transport object from that.
Pls check if this helps .. I have explained how to use java jars here and jars for mailing service has been explained in this video itself. ruclips.net/video/yOvDrn3Z484/видео.html
No need of another video. Because attachment code is an single line code MimeBodyPart attachment= new MimeBodyPart(); attachment. attachFile("your file name"); Okk
I have shown emails at the end of this video with hidden mailing ids. While you are executing this code you can use email Id of your choice and get the mails. Hope this helps . Thanks !!
Code available at this page -
wp.me/pdJoZn-4u
Had to change the smtp port from 547 to 587 to work. Other than that everything is good, thank you.
Glad that it helped !!
Thank you bro! ez fix
best video on this topic but I really want to suggest to explain slowly as you are very fast
Thank you .. I will keep that in mind while explaining next topic 😊
This code has saved my life with a course project a day before the review 😭😭😭 Thank you soooo mucchhhh!!!! You're an amazing human being!!!
Please subscribe to my channel and share with your friends
i want to restrict the email for print, fwd, reply how can be this done ? is there any specific header that we need to set
I have the following error:
Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Modules activation and java.activation export package javax.activation to module org.jetbrains.annotations
Even though I have the following dependencies:
com.sun.activation
javax.activation
1.2.0
javax.activation
javax.activation-api
1.2.0
Thank you so very much !!! My brain would be explode XD
All the best 😊
hey i like your video. this code run can run local machine very well but if your server ip is different then you stuck even you can make security low still it wont work. can you come up solution of that. also please when u doing please check another case after 10 min are you still able to send mail. thanks..
Thanks for liking the video . I am able to send emails at anytime using this code..never found any issues with that . Also, if you make changes in gmail security and allow it to get accessed by low security apps and remove 2-way authentication.. it should work
@@CodeTechGyan ok can you please make another video to host this app in vps/server(linux) and send mail back to you. and during that please show IP address of yours and server IP. Hope it will clear doubts.
Sure , I will check on that
Very good and helpful, but the email body is sent as an attachment. Anyone know how to resolve this?
You can change the body part with this code :
MimeBodyPart bodyPart = new MimeBodyPart();
bodyPart.setText(emailBody, "UTF-8","plain");
I hope this works for you 😉
Its Showing .. : Could not connect to smtp host : email host value , port number
Pls try with different port number and make sure you have entered correct host name .
Please subscribe our channel ☺️
thanks a lot...
long live sister..lol
I have a work similar to your video can you help me take a look at it?
I figured out that throwing the exceptions is one of the problems I'm having and it says it can't initialize the main class. Do you have any suggestions?
use it in the main method and use try and catch
Can you post the whole code on like git
Sure .. I will do that and share the link 👍🏻
here is the code repository
github.com/GitAccSK/code-tech-gyan/blob/main/Send%20email%20using%20java
Great video! But I get the issue that it sends a document ""noname" and no body text when running your exact code. How can I fix this?
Looks like email subject and body is not being added properly to the multipart object.can you compare your code to the git code I provided. Check video description for git link.
I have one doubt here and in general too,
How you create an instance of an object without using the keyword “new” for example Transport object here? Without the “new” keyword, Java cannot make a new instance of the object in heap memory, right!
You can get an object from connection factory. In this example newSession is a connection factory and getTransport() is used to fetch a transport object from that.
My InternetAddress showing error please help me to and give me a solution please. 😕😕😕😕😕
What is the error ?
thank you so much..
You are welcome
Hello, my body in the email is displayed as: "noname" and there's not the text which I have put in the emailbody, pls help
I actually fixed it myself: "i put this in bodyPart.setContent(emailBody, "text/html;charset=UTF-8);
You can check code on git repository mentioned in this video detail section. Hope you were able to send email successfully via this code 👍🏻
@@Alexander-dj1jp thank uu
is it working?
How do i set up the jar files?
Pls check if this helps .. I have explained how to use java jars here and jars for mailing service has been explained in this video itself. ruclips.net/video/yOvDrn3Z484/видео.html
how can i add signature and closing to mail?
You need to add signature in the multipart .
Hi...how to send bulk emails ?
If you want to send email to multiple recipient .. just add them in the recipient array separated by comma.
What does those jar files do ?
none of your business
@@Mr.noname_ You dumb, do you even understand what I asked, that you are commenting "none of your business" ?
Can't you see what I've commented that you've commented "none of your business" ?
Also, why you deleted my comment ?
is it maven based
No
@@CodeTechGyan got error in importing email. session
Learn how to send an attachment with slight modification ruclips.net/video/3KXnB2oqt1k/видео.html
No need of another video.
Because attachment code is an single line code
MimeBodyPart attachment= new MimeBodyPart();
attachment. attachFile("your file name");
Okk
why don't You show The emails
Don't watch this Videos 😕 waist of ⌚ U know what wanna Say😳
I have shown emails at the end of this video with hidden mailing ids. While you are executing this code you can use email Id of your choice and get the mails. Hope this helps . Thanks !!
I am getting exception that username and pasword not accepted. What should i do?
Did u fix it?