[Building Sakai] outgoing mail setting

wendy lee lhh at mail.sysu.edu.cn
Fri Feb 24 01:17:52 PST 2012


hi, steve

Yet the mail server "mail.sysu.edu.cn" need authentication. I wrote a little program to test the connection like the following, mail can be sent. So I believe the sakai.properties isn't setting correctly.

Properties props = new Properties();
Session session = Session.getInstance(props);
Transport transport = session.getTransport("smtp");
transport.connect("mail.sysu.edu.cn","USER","USERPASSWORD");
InternetAddress to1 = new InternetAddress();
to1.setAddress("lhh at mail.sysu.edu.cn");
InternetAddress[] to = new InternetAddress[1];
to[0] = to1;
MimeMessage msg = new MimeMessage(session);
msg.setSubject("test from programe");
msg.setText("content here", CharacterSet.UTF_8);
msg.saveChanges();
transport.sendMessage(msg, to);
transport.close();




wendy

From: Steve Swinsburg
Date: 2012-02-24 16:51
To: wendy lee
CC: sakai-dev
Subject: Re: [Building Sakai] outgoing mail setting
Hi
If you aren't using authentication then you need to comment out the user and password properties.

Cheers
Steve

Sent from my iPhone

On 24/02/2012, at 19:47, "wendy lee" <lhh at mail.sysu.edu.cn> wrote:

> hi, all
> 
> Is there any problem with the outgoing mail setting like the follow? Tomcat reports "javax.mail.AuthenticationFailedException: 535 5.7.8 Error: authentication failed: authentication failure". Thanks.
> 
> smtp.enabled=false
> smtp at org.sakaiproject.email.api.EmailService=mail.sysu.edu.cn
> smtpPort at org.sakaiproject.email.api.EmailService=25
> smtpUser at org.sakaiproject.email.api.EmailService=USER
> smtpPassword at org.sakaiproject.email.api.EmailService=USERPASSWORD
> smtpUseSSL at org.sakaiproject.email.api.EmailService=false
> smtp.dns.1=202.116.96.1
> smtp.dns.2=202.116.96.2
> setup.request=lhh at mail.sysu.edu.cn
> notifyNewUserEmail=true
> invalidEmailInAccountString=
> 
> 
> --------------
>  wendy lee
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120224/12a08120/attachment.html 


More information about the sakai-dev mailing list