A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How can I Prevent sending email by storing in spam
Joined: Jul 23, 2009
Sep 02, 2010 05:07:27
I am making a project using JavaMail that allow you sending and receiving mail using
Java Programming language,
but 8 out of 10 e-mail which has been sent saved into spam.
Please Help Me.
// Setup Mail Server by using java.util.Properties object props.put("mail.transport.protocol", "smtps"); props.put("mail.smtps.host", "smtp.gmail.com"); props.put("mail.smtps.auth", "true"); Session mailSession = Session.getDefaultInstance(props); //mailSession.setDebug(true); Transport transport = mailSession.getTransport("smtps"); // create a message object and set its attributes and content Message message = new MimeMessage(mailSession); message.setSubject(subject); message.setContent(content, "text/plain"); // set recipient type and address using setRecipient method on message object message.setRecipients(Message.RecipientType.TO, address); // Connect to the mail server by connect method on transport object transport.connect("smtp.gmail.com", 465,"mygmailid","mypassword"); // // send the message using sendMessage on transport method transport.sendMessage(message, address);
author and iconoclast
Joined: Jul 08, 2003
Sep 02, 2010 05:41:28
Well, let's ask the most obvious question: is it spam? In other words, what is the subject line, and what does the content look like? If your mail looks like spam, then obviously it's going to be filtered as such.
[Jess in Action]
Joined: Jul 23, 2009
Sep 02, 2010 06:06:55
My email saved into spam.
Joined: May 14, 2008
Sep 04, 2010 18:22:01
Then the spam filter thinks it's spam. Looks like you are sending it ti a gmail account, you'll have to read up on how the gmail spam filter works.
JBoss In Action
author and jackaroo
Joined: Mar 28, 2003
Sep 04, 2010 20:08:03
Ernest asked you 3 questions, and you responded by stating something that was already in your 1st post. Do you really think anyone can help you if you don't
The Sun Certified Java Developer Exam with J2SE 5:
paper version from Amazon
PDF from Apress
, Online reference:
I agree. Here's the link:
subject: How can I Prevent sending email by storing in spam
Email Host Configuration Problem
Need help to setup java mail API
Help with java mail.
using google to send email by JavaMail
JSP using javamail
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014