Hallo habe folgender mailer bei mir im Einsatz, leider funktioniert dieser nur ohne authentifiaktion. Wie füge ich noch eine Authentifikation ein?
Gruss und vielen Dank
Code:
<%! private void sendMail( String mailServer, String subject, String to, String from, String messageText ) { try { SmtpClient mailer = new SmtpClient( mailServer ); mailer.from( from ); mailer.to( to ); // More than one recipient may be separeted by commas // Get the PrintStream for writing the rest of the message java.io.PrintStream ps = mailer.startMessage(); // Write out any mail headers ps.println( "From: " + from ); ps.println( "To: " + to ); ps.println( "Subject: " + subject ); // Write out the message body ps.println( messageText ); // Send the message mailer.closeServer(); } catch ( Exception e ) { System.out.println( "Exection in function sendEmail" ); System.out.println( e.getMessage() ); } } %>
Gruss und vielen Dank
Comment