Ich bin nicht in der Lage, E -Mail -Inhalte mit Javax Mail IMAP zu lesen, da weniger sichere Apps jetzt nicht mehr verfüJava

Java-Forum
Anonymous
 Ich bin nicht in der Lage, E -Mail -Inhalte mit Javax Mail IMAP zu lesen, da weniger sichere Apps jetzt nicht mehr verfü

Post by Anonymous »

Fehler, mit dem ich mit < /em>
Internal.qaauto.framework.exceptions.EmailDriveException ausgesetzt bin.

Code: Select all

at internal.qaauto.framework.drivers.email.ImapsEmailDriver.connect(ImapsEmailDriver.java:55)
at certainwebapptests.CreateSubAccount.setUp(CreateSubAccount.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:178)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
< /code>
verursacht durch: javax.mail.authenticationFailedException: [AuthentifizierungFailed] Ungültige Anmeldeinformationen (Fehler)
bei com.sun.mail.imap.imapstore.ProtocolConnect (Imapstore.java:661)
at AT AT AT AT. javax.mail.service.connect (service.java:295)
at internal.qaauto.framework.drivers.email.imapsemailDriver ConnectionProperties = neue Eigenschaften (); < /p>
        // Set IMAPS as store protocol

connectionProperties.put("mail.store.protocol", "imaps");
connectionProperties.put("mail.imaps.ssl.checkserveridentity", "false");

// Create a session with mail server
session = Session.getDefaultInstance(connectionProperties);

// Get the Store, which is JavaMail name for the entity that holds the mails.
store = session.getStore("imaps");

// Connect the recently created Store
reporter.debug("Connecting to " + MAIL_HOSTNAME + ":" + IMAP_PORT + " using " + MAIL_USER + "/" + MAIL_PASSWORD);
store.connect(MAIL_HOSTNAME, IMAP_PORT, MAIL_USER, MAIL_PASSWORD);

// Check that connection was successful
checkConnection();

// Select Inbox folder
selectFolder("Inbox");
} catch (MessagingException e) {
reporter.error("Unable to connect to mail server " + MAIL_HOSTNAME + " through port " + IMAP_PORT + ". Using "
+ MAIL_USER + "/" + MAIL_PASSWORD + ". Reason: " + e.getMessage());
throw new RuntimeException(e);
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post