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
@AkankshaThokade3 жыл бұрын
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!!!
@CodeTechGyan3 жыл бұрын
Please subscribe to my channel and share with your friends
@jamesdawson47832 жыл бұрын
Had to change the smtp port from 547 to 587 to work. Other than that everything is good, thank you.
@CodeTechGyan2 жыл бұрын
Glad that it helped !!
@edwinmanalaotao20192 жыл бұрын
Thank you bro! ez fix
@yeshuverma31023 жыл бұрын
best video on this topic but I really want to suggest to explain slowly as you are very fast
@CodeTechGyan3 жыл бұрын
Thank you .. I will keep that in mind while explaining next topic 😊
@CodeTechGyan2 жыл бұрын
Please subscribe our channel ☺️
@dev100treta3 жыл бұрын
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
@DeepakMaurya-bb3wf4 жыл бұрын
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..
@CodeTechGyan4 жыл бұрын
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
@DeepakMaurya-bb3wf4 жыл бұрын
@@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.
@CodeTechGyan4 жыл бұрын
Sure , I will check on that
@anonofDeath3 жыл бұрын
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?
@thoraxlaneus99613 жыл бұрын
use it in the main method and use try and catch
@kristjantoplana299310 ай бұрын
Very good and helpful, but the email body is sent as an attachment. Anyone know how to resolve this?
@netuser25138 ай бұрын
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 😉
@040aniruddhagunjal6 Жыл бұрын
Its Showing .. : Could not connect to smtp host : email host value , port number
@CodeTechGyan Жыл бұрын
Pls try with different port number and make sure you have entered correct host name .
@CodeTechGyan4 жыл бұрын
Learn how to send an attachment with slight modification kzbin.info/www/bejne/aXy7n3VopNanZ80
@fulari31723 жыл бұрын
No need of another video. Because attachment code is an single line code MimeBodyPart attachment= new MimeBodyPart(); attachment. attachFile("your file name"); Okk
@giantgamingt9002 Жыл бұрын
I am getting exception that username and pasword not accepted. What should i do?
@omegamedia350811 ай бұрын
Did u fix it?
@ayushpandey74 жыл бұрын
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!
@CodeTechGyan4 жыл бұрын
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.
@ColinK33103 жыл бұрын
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?
@CodeTechGyan2 жыл бұрын
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.
@mecoboehme1974 Жыл бұрын
I have a work similar to your video can you help me take a look at it?
@atishkumarsahu60952 жыл бұрын
My InternetAddress showing error please help me to and give me a solution please. 😕😕😕😕😕
@CodeTechGyan2 жыл бұрын
What is the error ?
@felixkarma49833 жыл бұрын
Thank you so very much !!! My brain would be explode XD
@CodeTechGyan2 жыл бұрын
All the best 😊
@Sinbad19993 жыл бұрын
How do i set up the jar files?
@CodeTechGyan3 жыл бұрын
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. kzbin.info/www/bejne/r4DZdaWkaL9nbpY
@trankhaiminhkhoitran79283 жыл бұрын
Can you post the whole code on like git
@CodeTechGyan3 жыл бұрын
Sure .. I will do that and share the link 👍🏻
@CodeTechGyan3 жыл бұрын
here is the code repository github.com/GitAccSK/code-tech-gyan/blob/main/Send%20email%20using%20java
@rahulmistry5381 Жыл бұрын
What does those jar files do ?
@Mr.noname_4 ай бұрын
none of your business
@rahulmistry53814 ай бұрын
@@Mr.noname_ You dumb, do you even understand what I asked, that you are commenting "none of your business" ?
@rahulmistry53814 ай бұрын
Can't you see what I've commented that you've commented "none of your business" ?
@rahulmistry53814 ай бұрын
Also, why you deleted my comment ?
@joaquingutierrez54353 жыл бұрын
how can i add signature and closing to mail?
@CodeTechGyan2 жыл бұрын
You need to add signature in the multipart .
@prashanthabhat54973 жыл бұрын
Hi...how to send bulk emails ?
@CodeTechGyan2 жыл бұрын
If you want to send email to multiple recipient .. just add them in the recipient array separated by comma.
@ashleshapawar4442 жыл бұрын
is it maven based
@CodeTechGyan2 жыл бұрын
No
@ashleshapawar4442 жыл бұрын
@@CodeTechGyan got error in importing email. session
@velmuruganr93213 жыл бұрын
thanks a lot... long live sister..lol
@hindavilande16362 жыл бұрын
thank you so much..
@CodeTechGyan2 жыл бұрын
You are welcome
@CrazyAshu343 жыл бұрын
why don't You show The emails Don't watch this Videos 😕 waist of ⌚ U know what wanna Say😳
@CodeTechGyan3 жыл бұрын
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 !!
@Alexander-dj1jp3 жыл бұрын
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
@Alexander-dj1jp3 жыл бұрын
I actually fixed it myself: "i put this in bodyPart.setContent(emailBody, "text/html;charset=UTF-8);
@CodeTechGyan3 жыл бұрын
You can check code on git repository mentioned in this video detail section. Hope you were able to send email successfully via this code 👍🏻