Email Form

Hi All,

After 3 months of using vaadin, I have created an
addon for Email
for sending emails. -_-
This is an experimental version, as there is a minor flickering in the usage of grid layout. ( Not sure why )

But apart, from that, the core funtionality of sending html based email is working fine.
Have a look and drop in your comments.

Thnx and Regardz
Vasu Patnaik.

Hello Vasu,

Hope you could be back to read the post.

I download a copy of your addon-on and have a try. Unfortunately I coundn’t pass the application.

Please see my steps below:

  1. Set my email server and account:
    email.setEmailHost(“smtp.gmail.com”);
    email.setUsername(“myaccount”);
    email.setPassword(“mypassword”);
    email.setEmailHostPort(465);
    email.setFromEmailId(“myemailaddress.gmail.com”);

  2. Launch Tomcat, but a warning is reported:
    Warning: [SetPropertiesRule]
    {Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:email’ did not find a matching property.

  3. Input “To address”, “Subject”, “Content” and click “Send”, the program loops in email.send() and cannot continue to the next sentence.

Do you have any suggestion about my steps?

BTW, I have another problem to send the localization email. Please see my post
http://vaadin.com/forum/-/message_boards/message/209718
.

Thanks in advance,
Watt

Hi Watt,

Whether, you are working behind a proxy ?

Thanx and Regardz
Vasu Patnaik.

Hello Vasu,

I can send my emails correctly using javax.mail.Transport() right now, which there is no need to set proxy in my program.

Thanks,

Watt

Hello Watt Lee,

Can you please providing a working example for that ?

Thank you.
Ramzi

Hello Ramzi,

Following code is being used to send emails via gmail sever in GWT environment:

			Properties props = new Properties(); 
			Session mailSession = Session.getDefaultInstance(props, null);
			MimeMessage message = new MimeMessage(mailSession);
			message.setFrom(new InternetAddress("from@sample.com"));
			title = MimeUtility.encodeText(title, "utf-8", null);
			message.setSubject(title);
			message.addRecipient(Message.RecipientType.TO, new InternetAddress("to@sample.com"));
			message.setText(htmlContent);			
			Transport.send(message); 

Hope it’s helpful for you,
Watt

Thank you Watt,
I’ll make a try.

Hello Vasu Patnaik,
I solved the encoding problem, but now I have a problem that was not a one before, Can’t send attachment files now.

I think that it’s a multipart problem.

That’s what I added:

Regards,
Ramzi Youssef

HI all,

where i will get complte addon for email and fax notifications?