How to Send Emails in Selenium Webdriver Using Commons email API

  Рет қаралды 81,011

Mukesh otwani

Mukesh otwani

Күн бұрын

This video will guide you How to Send Emails in Selenium Webdriver Using Commons email API and how to trigger based on test failure or test pass.
Below are the important links
For Maven User
mvnrepository....
Home Page
commons.apache...
Examples
commons.apache...
Send email using Java Email API
learn-automatio...
~-~~-~~~-~~-~
Please watch: "How To Create Maven build For Selenium Framework"
• How To Create Maven bu...
~-~~-~~~-~~-~

Пікірлер: 237
@monicagoyal8225
@monicagoyal8225 2 жыл бұрын
Thanks for creating an easy, simple yet complete content.
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
Thanks Monica for being regular follower at this channel.
@platinium31
@platinium31 5 жыл бұрын
The best I ve seen so far this guy is amazing!
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Plamen Your comment made my day Thanks I am glad you liked my content 😀
@manaspradhan2166
@manaspradhan2166 7 жыл бұрын
Hi Mukesh, once again great video, you always started from basic so that everyone can understand...that's a great and unique thing about your post...
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Thanks Manas :)
@harivardhan43
@harivardhan43 6 жыл бұрын
To solve authentication failed exception who are using Gmail Go to My Account -> Apps with account access-> Allow less secure apps:ON enable This changes worked for me.
@akashjindal8709
@akashjindal8709 3 жыл бұрын
Thanks for the knowledge Mukesh !! Simple, easily understandable with complete details !!! Simple amazing !!!
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Thanks Akash 🙏
@akashjindal8709
@akashjindal8709 3 жыл бұрын
@@Mukeshotwani It would be great if u could help me in letting know : how we can send extent report content as a email body...as when m sending it as an attachment..it is been opened distorted...just like plain text and randomly arranged..
@vaibhavpagare6307
@vaibhavpagare6307 3 жыл бұрын
@@akashjindal8709 facing same issue, found any solution for this?
@akashjindal8709
@akashjindal8709 3 жыл бұрын
@@vaibhavpagare6307 no...still trying to resolve as and when got time ..
@powerofcouple4517
@powerofcouple4517 7 жыл бұрын
Thanks a lot, Mukesh... you are doing a great job...
@AshokKumar-ye3zc
@AshokKumar-ye3zc 7 жыл бұрын
Thanks Mukesh for sharing the useful information....
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Welcome Ashok
@ManzoorAhmad-ny8rp
@ManzoorAhmad-ny8rp 7 жыл бұрын
Thanks for sharing this useful video!!!
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes sure Manzoor
@bhaveshdesai4732
@bhaveshdesai4732 7 жыл бұрын
Thanks for the requested topic video.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
WELCOME mate
@dishasuryawanshi2177
@dishasuryawanshi2177 5 жыл бұрын
How can i send the email-able report present in test-output folder to mail ID using commons api without using Jenkins and it should send the latest report only as using sendmail() method in AfterSuite doesn't work because after all testng annotation only emailable report is created
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Disha, Jenkins comes with very good plugin called ext mail plugin, which will allow you to send email based on trigger kzbin.info/www/bejne/nYWcoqGQnpiZbZY Please go through it and if you found any issue then let me know.
@keshavdwivedi5192
@keshavdwivedi5192 7 жыл бұрын
Very nice video please upload a detailed video for this topic
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes sure
@jayantiborde899
@jayantiborde899 5 жыл бұрын
Thank you for the Video Sir, I executed this First Time Successfully, you are detailing very nicely in the video about the concepts.
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Thanks Jayanti
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Best of luck and let me know if any help required from my side.
@sureshdas3187
@sureshdas3187 5 жыл бұрын
Hi mukesh..this is very useful man..👍🏻👍🏻
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Thanks Suresh :)
@srinivastrully3789
@srinivastrully3789 7 жыл бұрын
HI Mukesh, I appreciate your service to Automation Testing World. My question is, how to email "emailable-report.html" , generated under test-output folder, through Java code in eclipse
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
HI Srini, This will help commons.apache.org/proper/commons-email/userguide.html
@abhisheksarkar1059
@abhisheksarkar1059 7 жыл бұрын
Hello Mukesh, Please address the below doubts 1)What exactly Default Authenticator class does? 2)Which id and password do we send in its parameter? Thanks in advance, Abhishek
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Abhi Default Authenticator class used for authentication and use your id and password for sending emails.
@zahidhusain1347
@zahidhusain1347 7 жыл бұрын
Hi Mukesh.. Can you please guide us on how to attach an attachment to the email. Or if you have already made a video on it. please share the link.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Zahid, you can refer below guide for attaching screenshot. commons.apache.org/proper/commons-email/userguide.html
@towhidskynet
@towhidskynet 7 жыл бұрын
One thing to note is that if you are unable to send mails or getting exceptions, you'll need to change your gmail settings to allow less secured app to connect to you account.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes correct Towhid
@srikanthreddy7928
@srikanthreddy7928 4 жыл бұрын
hi Mukesh Sir ,i want to send emails one by one taking from excel sheet using seleinum plz teach
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Srikanth, what is your issue or doubt here?
@pranav-kale
@pranav-kale 4 жыл бұрын
This video was helpful , Thank you
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
You're welcome! Pranav
@archanabehl9830
@archanabehl9830 7 жыл бұрын
Hi Mukesh. This video was a big help. Could you please upload a video on how to attach a file in email? Thanks.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes Archana yes i will upload next video on this.
@Avaeroh182
@Avaeroh182 5 жыл бұрын
Hi Mukesh, what Chrome extension are you using at 3:47 to add colours to the Simple Text Email example?
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hey Avaeoh I use www.grammarly.com/ chrome extension
@raghuteja6467
@raghuteja6467 6 жыл бұрын
Hi Mukesh, Firstly thanks for your videos and I'm trying configure maven and Commons mail jar in my Mac book pro but I couldn't able done it, could u guide me to do it.
@sachinprem25
@sachinprem25 5 жыл бұрын
Hey mukesh, just wanted to ask. How to write this same code under normal class file? Because this code will work only if it is written under main. I want to run this in aftermethod so
@5767mshrgaurav
@5767mshrgaurav 7 жыл бұрын
Hi Mukesh, Is there any way by which we can use our default MS Outlook application to send the email instead of using web mail?
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Our mail goal is to send email so why we have to send through MS Outlook application?
@5767mshrgaurav
@5767mshrgaurav 7 жыл бұрын
Mukesh otwani: Thanks for the reply. Actually with client's provided SMTP, I am unable to send the email. so was wondering if somehow we can send using outlook application.
@narasimharao9659
@narasimharao9659 2 жыл бұрын
Hi Mukesh, Thanks for the video. How to validate once email is sent to gmail? Can you please provide your input? Thanks.
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
Hi Narasimha, Commons email deals only with sending email commons.apache.org/proper/commons-email/userguide.html
@aneeshahamed2490
@aneeshahamed2490 7 жыл бұрын
Hi Mukesh, I m using Eclipse Luna. It does not show maven project. plz tell me the solution.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Aneesh, Open Eclipse > Help> Install new software > enter below download.eclipse.org/technology/m2e/releases and hit enter It will install maven then you will get maven project option
@aneeshahamed2490
@aneeshahamed2490 6 жыл бұрын
Thanks Mukesh.
@bhaskerabhilasha5234
@bhaskerabhilasha5234 3 жыл бұрын
Hi Mukesh, I used the same code. It sent email just once after that it’s not throwing exception but email is not sent. Pls suggest
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Please share the exception trace.
@ishanmittal4732
@ishanmittal4732 7 жыл бұрын
Hi Mukesh I tried the same code & Jars(I added commons-email-1.3.1 sources.jar, activation-1.1.1.jar, & mail.1.4.5.jar) using testNG but unable to import Email, SimpleEmail & DefaultAuthenticator classes. Please suggest.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Ishan, Why don't you try with maven project? It is quite easy and nowadays in the market, we use Maven projects. Kindly refer below links which will guide you for the same learn-automation.com/maven-integration-with-selenium/ learn-automation.com/selenium-maven-build-and-usage/
@ishanmittal4732
@ishanmittal4732 7 жыл бұрын
Yes , now i tried with maven & all the errors are gone, but getting some error: xception in thread "main" org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1401) at org.apache.commons.mail.Email.send(Email.java:1428) at mavenproject.random.Sendmailjava.main(Sendmailjava.java:21) Caused by: javax.mail.AuthenticationFailedException: 534-5.7.14
@vineelp
@vineelp 7 жыл бұрын
Hi Ishan, Got the same error even after allowing less secure apps. If you fixed it please share your solution.
@vineelp
@vineelp 7 жыл бұрын
Antivirus was the issue(stackoverflow.com/a/44981218/1647913)
@ishanmittal4732
@ishanmittal4732 7 жыл бұрын
Worked for me... Thanks Vineel and of course Thanks Mukesh for this code:)
@drczen9263
@drczen9263 2 жыл бұрын
Hi Mukesh, Can you pls explain how to reply to the same email which we triggered via automation
@YogeshGujratiiamyogesh
@YogeshGujratiiamyogesh 7 жыл бұрын
Thanks man Great Job
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Welcome Yogesh bhai
@raghuram7893
@raghuram7893 5 жыл бұрын
Hi Mukesh,FOr example after filling any form I want to send a mail from outlook to somebody in my organization.Can we automate that functionality
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Ram, You can use outlook service for this or RPA tools which will do this task for u. The API which I mentioned in the video will use smtp protocol to send the email.
@shaikmasthan833
@shaikmasthan833 4 жыл бұрын
Hi Mukesh, using the same dependency can i login to the Gmail account and click on confirmation link for forgot password stuff
@lakshmikanth1752
@lakshmikanth1752 4 жыл бұрын
Hi Mukesh, on failures, I want to attach extent report to my mail, how do I do it using common api?
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Yes Lakshmi, you can attach here is the sample code commons.apache.org/proper/commons-email/userguide.html
@rushikeshshirsate643
@rushikeshshirsate643 3 жыл бұрын
Hi mukesh, i want to send Outlook email after test execution can you provide documentation around this
@asisharavind655
@asisharavind655 6 жыл бұрын
Thanks Mukesh. Your videos make the learning very simple and interesting. God bless you!! I have a question. What settings need to be changed in the gmail and where do we need to adjust port and authentication?
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Ashish, Use below settings for SMTP in Gmail. » Email sending To send emails using Gmail server enter these details: SMTP Host: smtp.gmail.com SMTP Port: 587 SSL Protocol: OFF TLS Protocol: ON SMTP Username: (your Gmail username) SMTP Password: (your Gmail password) ThanksMukesh Otwani
@varungattu7587
@varungattu7587 7 жыл бұрын
Thanks Mukesh! Just wondering if there is a way to attach the TestNG or ExtentReport to the email after the test is done? (Possibly without using Jenkins) I want to send out the email with the test result to the stakeholders.
@bharathmadishetti
@bharathmadishetti 7 жыл бұрын
You can do that with the help of testng listeners.
@hennymakaveli
@hennymakaveli 7 жыл бұрын
Hello Mukesh, please how do I get the 3 jars without creating maven project with its dependency? When I unzip the file on the apache commons mail, I got 3 jars but the names are not the same with the one on your maven project. Kindly help out
@TheUkr1244
@TheUkr1244 7 жыл бұрын
Hi Mukesh, Not working in my machine. Showing error "Sending the email to the following server failed : smtp.gmail.com:465"
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
HI Kiran please check gmail smtp server settings and try with some other port number as well.
@vineelp
@vineelp 7 жыл бұрын
Hi Mukesh, Got the same error even after allowing less secure apps, also tried other port numbers. Any suggestions?
@vineelp
@vineelp 7 жыл бұрын
Antivirus was the issue(stackoverflow.com/a/44981218/1647913)
@prakratiagarwal8237
@prakratiagarwal8237 5 жыл бұрын
Hi Mukesh, I am not able to use attach method . Can you help here ?
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Prakrati what issues you are facing ?
@pk4122
@pk4122 7 жыл бұрын
Hi Mukesh, Can you please upload video without involving MAVEN? That will be great help. Thanks
@Bujji28243
@Bujji28243 7 жыл бұрын
Hiii Mukesh I practiced all cucumber videos myself but I have to need how to use datadriven in cucumber by using excel sheet??
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
www.seleniumframework.com/cucumber-jvm-3/data-driven-framework-with-excel/
@Bujji28243
@Bujji28243 7 жыл бұрын
Thanks mukesh..
@jobsjobs5902
@jobsjobs5902 6 жыл бұрын
Mukesh, I followed each and every step; step by step. But still I was not able to send message. I used updated versions of dependency as well. Nothing worked. Can you please say what could have gone wrong? Thanks
@GurudattaPraharaj
@GurudattaPraharaj 7 жыл бұрын
getting authentication failed exception & got a security alert mail from google. plz help
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes I mentioned in video that you have to allow low secure app in your gmail account
@ajeetgour907
@ajeetgour907 7 жыл бұрын
Hi Mukesh, please upload a video for Xslt report generation using maven. this is very much needed.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Ajeet, We dont have maven dependency for XSLT report. You can use extent report with Maven
@ajeetgour907
@ajeetgour907 7 жыл бұрын
Mukesh otwani OK 😃
@snehalatabehera7303
@snehalatabehera7303 3 жыл бұрын
Will this for Outlook mail?
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Hi Snehalata, this API works as protocol level so you dont need outlook. Outlook is just software where you can configure any email and use the same.
@divyasengutto497
@divyasengutto497 2 жыл бұрын
Hi Mukesh.. could you pls post/share me your video of how to open and read outlook email??
@GaneshJoshi-x9i
@GaneshJoshi-x9i Жыл бұрын
Hi Mukesh, Thanks for the video..!! how can we send 1000 of mail at a time with the different email address .. it is possible ?
@anjumsawnoorkar4268
@anjumsawnoorkar4268 7 жыл бұрын
hello mukesh sir ,i want the send mail video in java +selenium ,if my automation script fails then mail is send to particular email address .
@mushfiquazaman9597
@mushfiquazaman9597 3 жыл бұрын
Hi Mukesh, Do I have to have TestNG ? will JUNIT not be able to send email when test fail?
@shivanshkumar2779
@shivanshkumar2779 2 жыл бұрын
Hi Mukesh, I'm using selenium through a robot framework is it possible to send emails through that?
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
Hi Shivansh, please check this pypi.org/project/robotframework-imaplibrary/
@shalinibhagat5963
@shalinibhagat5963 7 жыл бұрын
Hi Sir, I am trying to send email to failed test cases. but it is showing " java.lang.IllegalArgumentException: wrong number of arguments ", kindly suggest, how to solve this issues.
@shukrantpatel7024
@shukrantpatel7024 4 жыл бұрын
I am doing same thing as explained in video but i am getting following error every time when i run the code. org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 please tell me what i m doing wrong.
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi SHukrant, please create new gmail account and try the same code.
@shukrantpatel7024
@shukrantpatel7024 4 жыл бұрын
@@Mukeshotwani ok sir, let me try this. Thanks for your response.
@MAziz-xd6cp
@MAziz-xd6cp 3 жыл бұрын
@@Mukeshotwani I have created new Gmail account and try the same code from copied from your program but still getting same exception.
@sagar2062
@sagar2062 6 жыл бұрын
Hello Mukesh When I am sending email in my mail id and want to click on specific subject moreover , it's not clicking on specific subject
@pranayac203
@pranayac203 4 жыл бұрын
Hi Mukesh, is there any api which i can use to read the email from outlook office 365. Please teach me.
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Pranaya, I could find these API but did not try docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations
@karthikchidambaram86
@karthikchidambaram86 4 жыл бұрын
Hi, How to click hyperlink from outlook using selenium How to read OTP from outlook using selenium
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hey Karhik, If you can can mailbox using browser then you can go with Selenium and for reading otp you can read complete email using getText then use split method to capture otp.
@sandipvpcoe
@sandipvpcoe 4 жыл бұрын
Can we trigger execution using email? If yes please create one video on this
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Mate, what is your exact requirment?
@sandipvpcoe
@sandipvpcoe 4 жыл бұрын
@@Mukeshotwani I want to send email to my mailbox with specific subject and it should trigger automation scripts automatically
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
@@sandipvpcoe You can use this jenkins plugin for this github.com/jenkinsci/poll-mailbox-trigger-plugin
@anshuupadhyay4661
@anshuupadhyay4661 3 жыл бұрын
HI .Is there a way where we can do this without providing our username and password in Default Authenticator ?
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Not tried but please try and let me know if that works. I am using Jenkins mostly for emal notifications.
@archananair3819
@archananair3819 Жыл бұрын
Hi mukesh, which username and password need to be added next to DefaultAunthenticator? I have added username and password of default account in may gmail account.. Is that right?
@NishantRaj
@NishantRaj 6 жыл бұрын
Hi Mukesh, please let me know how to verify email. Scenario 1) ordered one product with Flipkart 2) after placing an order I receive one mail in my mailbox. please let me know how to verify that mail.
@chaitrashree2866
@chaitrashree2866 6 жыл бұрын
Hi Mukesh .. can you please upload similar video for reading emails from outlook ...
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Chaitra if you want to read outlook emails then RPA tools can help.
@chaitrashree2866
@chaitrashree2866 6 жыл бұрын
Mukesh otwani Is it not possible to read outlook emails using selenium ? Using javaapi ... if so can you please tell me wat configurations i need to do
@omprakashrajak6997
@omprakashrajak6997 7 жыл бұрын
hi how to work with kendo combobox drop-down in that we. don't have select tag instead of that we have span tag
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Om this will help learn-automation.com/handle-bootstrap-dropdown-in-selenium-webdriver/
@omprakashrajak6997
@omprakashrajak6997 7 жыл бұрын
thanks
@PavanKumarBachu
@PavanKumarBachu 7 жыл бұрын
Hello Mukesh, really appreciate to educate abut Selenium. I would like to know if the HP Webinspect has some kind of API that I can use it in the Selenium Scripting
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Pavan I dont have any idea on HP Webinspect
@karayilbibin
@karayilbibin 7 жыл бұрын
Getting below error in line : email.setAuthenticator(new DefaultAuthenticator("username@gmail.com", "password")); error - The method setAuthenticator(Authenticator) from the type Email refers to the missing type Authenticator Kindly help
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Bibin you have to add other jars as well as I said in video
@sagarikanayak6290
@sagarikanayak6290 2 жыл бұрын
Hi Mukesh, if i want to send to multiple recipients how we can we proceed
@malvikasrivastava2285
@malvikasrivastava2285 6 жыл бұрын
Hi Mukesh, Thanks for this video, this was quite helpful. Could you please provide the video URL for 'Sending an Email with HTML attachment using Selenium WebDriver'? That would be grateful. Looking forward for a response. Many Thanks
@jobsjobs5902
@jobsjobs5902 6 жыл бұрын
Thanks a lot Mukesh I followd step by step, but still the email was not generated. I may be doing something wrong. I will try again.
@ArbazAhmed
@ArbazAhmed 7 жыл бұрын
Hi mukhesh make a video on Katalon Studio tool
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Arbaz This is customized tool but I will try soon.
@DiptiJoshi2415rjdj
@DiptiJoshi2415rjdj 5 жыл бұрын
Hi Mukesh , Good Evening Hope you are great Can I trigger email through tfs
@pujadebnath4793
@pujadebnath4793 5 жыл бұрын
Hi Mukesh, How can we automate the Microsoft login function?
@Archanakulkarni28
@Archanakulkarni28 2 жыл бұрын
hi mukesh , where is the extend report attachment video
@B__TirnaSil
@B__TirnaSil 8 ай бұрын
Hi Sir plz help me..... (Email email = new SimpleEmail();) there is no option to import and the red errors are not going from email and SimpleEmail
@mohitgupta4394
@mohitgupta4394 7 жыл бұрын
Hi Mukesh, thanks for sharing useful content. Keep sharing knowledge :) Much Appreciated your efforts. O:-)
@krishnakulkarni1875
@krishnakulkarni1875 2 жыл бұрын
Hi, I am facing issue "The mail session is already initialized" plz help me
@jyotiranjan3731
@jyotiranjan3731 Жыл бұрын
Do we have latest jar for this?
@sanatsingh2585
@sanatsingh2585 7 жыл бұрын
Please create video on restful API automation using java
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes Sanat will make soon
@anjumsawnoorkar4268
@anjumsawnoorkar4268 7 жыл бұрын
how to login multiple user in selenium webdriver
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Anjum, Here you go learn-automation.com/data-driven-framework-in-selenium-webdriver/
@baldygaming2226
@baldygaming2226 7 жыл бұрын
new content!!! 💪💪💪💪💪💪💪
@chittajena4075
@chittajena4075 7 жыл бұрын
is there anything on .Net platform?
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
no Jena this will work for JAVA only
@thanhthu126t3
@thanhthu126t3 2 жыл бұрын
How is diffrent bettween authen account and from account?
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
Auth account is main account and from is just a reference for same account.
@poojaapij561
@poojaapij561 4 жыл бұрын
Hello , As you told in video and comment i made Allow less secure apps: ON this but stil am getting error as ,org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 Tried with new email also
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Pooja, please share your program let me check mukeshotwani@learn-automation.com
@zhunzargulhane6741
@zhunzargulhane6741 4 жыл бұрын
@Kunal Soni even i am unable to send email even after turning on the less secured access
@torontomapleleafsfanbrother
@torontomapleleafsfanbrother 7 жыл бұрын
Hi I need a test coded in java and selenium. Can you do it for me I am prepared to pay for it.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
+Sanjay Dahiya hi Sanjay can you send me exact requirements so that I can look into it.
@RaviKumar-hz8cf
@RaviKumar-hz8cf 6 жыл бұрын
hi mukesh ,in code email.setSSLOnconnect(true) it is giving error and as sujjestion it is telling me to "Add cast to email".. When i m doing it is casting it to object type plzz help how to resolve the issue
@BiswajitBiswal
@BiswajitBiswal 3 жыл бұрын
how to send a mail with an attached screenshot using selenium???
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Hi Biswa, Selenium is for WebAutomation so we are using common api to send email. Once report is ready we need to use below API to send email with attachment commons.apache.org/proper/commons-email/userguide.html
@BiswajitBiswal
@BiswajitBiswal 3 жыл бұрын
@@Mukeshotwani Thank you mukesh for replied my question..alot to me..My task is to run current build on server, if error comes then it will take screenshots ..and send mail that screenshot to respective client.
@phanikumar5170
@phanikumar5170 6 жыл бұрын
can we automate webmail (i.e one.com website) by this tutorial
@ArunSharma-wm6od
@ArunSharma-wm6od 7 жыл бұрын
Hi Mukesh How to vedio record test execution in Selenium Webdriver ??
@lajishlakshmanan342
@lajishlakshmanan342 7 жыл бұрын
Please use monte-screen-recorder for same. Maven Repo link: mvnrepository.com/artifact/com.github.stephenc.monte/monte-screen-recorder
@simple_funda_UK03
@simple_funda_UK03 5 жыл бұрын
Is there any way I can read emails?? Or it can only be send.
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Amit this API is used only to send emails.
@simple_funda_UK03
@simple_funda_UK03 5 жыл бұрын
@@Mukeshotwani any other work around you suggest? Is there an API for reading also? I searched around but didn't find any.
@kishoripatil2302
@kishoripatil2302 Жыл бұрын
Hi Mukesh Sir, i have tried this code but am getting an error
@ommy123456
@ommy123456 7 жыл бұрын
brother i am facing problem when i create maven project then its creating red cross both file project file and pom.xml how to fix it
@karankhot6539
@karankhot6539 7 жыл бұрын
1. check tags ; opening and closing tags in pom.xml 2. mvn clean : right click on prjct and runAs mvn clean 3. mvn build: run As mvn build -- goals -- eclipse:eclipse.
@Archanakulkarni28
@Archanakulkarni28 2 жыл бұрын
I want to attach my extent report in the mail body
@swethabade5898
@swethabade5898 6 жыл бұрын
hi mukesh how can we print the from address and subject
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Swetha what is your requirement?
@swethabade5898
@swethabade5898 6 жыл бұрын
@@Mukeshotwani I need to print email count and subject and from address in console and excel
@puneetchauhan8196
@puneetchauhan8196 2 жыл бұрын
I think these api are deprecated...CAn you please send me update on this
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
You think or you have tried Puneet?
@SanthoshKumar-jz6go
@SanthoshKumar-jz6go 2 жыл бұрын
We can't able to send from gmail since the "third party access" option is deprecated. But we can send through other mails like yahoo by doing minor changes .
@raghuramanraman9780
@raghuramanraman9780 2 жыл бұрын
@@Mukeshotwani mukesh am using the same code but it is showing like syntax error on token also tell me how to attach the extent report to mail
@manideepm126
@manideepm126 6 жыл бұрын
i want to send mail the form my office mail (OFFICE 365) can u please tell me the SMTP address and port. i have tried so many ways but it is showing the error
@atos5728
@atos5728 6 жыл бұрын
Yes same prob for me alsoo please help....
@Satprajesh
@Satprajesh 4 жыл бұрын
how to add multiple email?? please help
@n.parushuram5253
@n.parushuram5253 7 жыл бұрын
ITS GETTING error on SETSSLonconnect is undefined under type email pls let me know sir
@GurudattaPraharaj
@GurudattaPraharaj 7 жыл бұрын
bro use the latest version 1.4
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
+Gurudatta Praharaj Hi Praharaj for me this version is more stable you can try 1.4 as well
@manohark9842
@manohark9842 7 жыл бұрын
Hi mukesh, is selenium 3.4 + gecko 0.16 stable ?
@n.parushuram5253
@n.parushuram5253 7 жыл бұрын
bro am using maven project and added dependency
@n.parushuram5253
@n.parushuram5253 7 жыл бұрын
sir am getting this error pls help me Exception in thread "main" org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242) at org.apache.commons.mail.Email.send(Email.java:1267) at Sentemail.main(Sentemail.java:21) Caused by: javax.mail.MessagingException: Exception reading response; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412) at javax.mail.Service.connect(Service.java:310) at javax.mail.Service.connect(Service.java:169) at javax.mail.Service.connect(Service.java:118) at javax.mail.Transport.send0(Transport.java:188) at javax.mail.Transport.send(Transport.java:118) at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232) ... 2 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source) at sun.security.ssl.AppInputStream.read(Unknown Source) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589) ... 10 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 23 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 29 more
@mdchowdhury8629
@mdchowdhury8629 7 жыл бұрын
thanks a lot
@preetrandhawa9344
@preetrandhawa9344 7 жыл бұрын
Hello sir me try to write coding of this site( way2automation.com/way2auto_jquery/index.php)) but not able to catch its login popup,,, even they already mentioned (all te best for login form) please solve my issue
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Yes Preet I checked there is 2 element for every element so try to click on the second element
@razvanvancea9002
@razvanvancea9002 6 жыл бұрын
Hello, I downloaded the jars from the email website, imported in a normal project and when I tried to run, I got the following error: Exception in thread "main" java.lang.Error: Unresolved compilation problems: The type javax.mail.Authenticator cannot be resolved. It is indirectly referenced from required .class files The method setAuthenticator(Authenticator) from the type Email refers to the missing type Authenticator For other people that encounter the above error: The solution is to import also a specific external javax.mail.jar file from here javaee.github.io/javamail/ Good luck :)
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hope you liked the video. Try this API and let me know your thoughts in comment section.
@IamShivaniPandit
@IamShivaniPandit 7 жыл бұрын
Are there videos in sequence?
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
+Shivani Sharma no Shivani but my blog post in arrange format u can follow that
@IamShivaniPandit
@IamShivaniPandit 7 жыл бұрын
Hi Mukesh, i gave interviews for java developer and got stuck in coding question. Now i am thinking to go for selenium. Do people ask coding questions to software testers.But when i watch your video its looking like its more difficult question compareto java developer question. I was giving interview for REST Api java developer. What should i do?
@ashwinik479
@ashwinik479 5 жыл бұрын
Hi Mukesh. How to redirect the email to another account based on the email subject using java
@aswanimucharla2567
@aswanimucharla2567 6 жыл бұрын
Great
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Thanks Aswani
@sugamshende5416
@sugamshende5416 2 жыл бұрын
Hi Mukesh... I am trying to send email through Outlook and I have asked my IT team to provide SMTP Port and name but getting javax.mail.AuthenticationFailedException
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
Hi Sugam, if you are using company SMTP server then you can try configuring proxy as well.
@naveenatammoviereview9319
@naveenatammoviereview9319 6 ай бұрын
@Sugam, did you get the solution ? Actually I am facing same issues.
Headless Browser Testing using HTMLUnitDriver in Selenium
14:28
Mukesh otwani
Рет қаралды 40 М.
Одну кружечку 😂❤️
00:12
Денис Кукояка
Рет қаралды 861 М.
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 30 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 64 МЛН
How to execute failed test cases in Selenium webdriver
17:09
Mukesh otwani
Рет қаралды 97 М.
How to Send Emails with Python [New Method 2023]
11:16
The PyCoach
Рет қаралды 197 М.
Cross Browser Testing In Selenium Webdriver Using TestNG Parameters
24:31
Wait for File Download using FluentWait in Selenium
14:54
Naveen AutomationLabs
Рет қаралды 10 М.
Sending Email Using the Gmail API And Java
27:27
Sebastian Daschner
Рет қаралды 50 М.
Send Email Notification From Jenkins With HTML Report
23:20
EasyWay2Automation - SDET
Рет қаралды 5 М.
How to implement FluentWait in Selenium Webdriver
20:26
Mukesh otwani
Рет қаралды 65 М.
#1 - Read PDF and Validate Content using PDFBOX in Selenium
24:25
Naveen AutomationLabs
Рет қаралды 31 М.
Dynamic XPath in Selenium  using Different Approaches
28:12
Mukesh otwani
Рет қаралды 300 М.
Одну кружечку 😂❤️
00:12
Денис Кукояка
Рет қаралды 861 М.