Note that there are some explanatory texts on larger screens.

plurals
  1. PONot Receiving email sent by localhost Mercury mail
    primarykey
    data
    text
    <p>I am using XAMPP for deploying my java application in tomcat and also using mercury mail to ssend emails. Now i am just testing my application with a small java program using java mail API and mercury email. I havee done the necessary configuration in Mercury to setup localhost. My program is running successfully without any error. Also Mercury log file doesn't say anything about any error. </p> <pre><code>T 20130411 044359 51663963 Connection from 127.0.0.1 T 20130411 044359 51663963 EHLO 10.226.44.101 T 20130411 044359 51663963 MAIL FROM:&lt;promil@localhost.com&gt; T 20130411 044359 51663963 RCPT TO:&lt;*****@gmail.com&gt; T 20130411 044359 51663963 DATA T 20130411 044359 51663963 DATA - 22 lines, 689 bytes. T 20130411 044359 51663963 QUIT T 20130411 044359 51663963 Connection closed with 127.0.0.1, 0 sec. elapsed. </code></pre> <p>Also this is my java file....</p> <p>public static void main(String [] args) {</p> <pre><code> // Recipient's email ID needs to be mentioned. String to = "****@gmail.com"; // Sender's email ID needs to be mentioned String from = "promil@localhost.com"; // Assuming you are sending email from localhost String host = "localhost"; String password = "****"; // Get system properties Properties properties = System.getProperties(); // Setup mail server properties.setProperty("mail.smtp.host", host); // Setup mail server properties.setProperty("mail.smtp.password", password); // Get the default Session object. Session session = Session.getDefaultInstance(properties); try{ // Create a default MimeMessage object. MimeMessage message = new MimeMessage(session); // Set From: header field of the header. message.setFrom(new InternetAddress(from)); // Set To: header field of the header. message.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); // Set Subject: header field message.setSubject("This is the Subject Line!"); // Create the message part BodyPart messageBodyPart = new MimeBodyPart(); // Fill the message messageBodyPart.setText("This is message body"); // Create a multipar message Multipart multipart = new MimeMultipart(); // Set text message part multipart.addBodyPart(messageBodyPart); // Part two is attachment messageBodyPart = new MimeBodyPart(); String filename = "C:/Users/toshiba/Desktop/file.txt"; DataSource source = new FileDataSource(filename); messageBodyPart.setDataHandler(new DataHandler(source)); messageBodyPart.setFileName(filename); multipart.addBodyPart(messageBodyPart); // Send the complete message parts message.setContent(multipart ); // Send message Transport.send(message); System.out.println("Sent message successfully...."); }catch (MessagingException mex) { mex.printStackTrace(); } </code></pre> <p>I am absolutely clueless about it..... Also my Mercury core process says it has 4 pending outgoing jobs....???</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload