Hi ,

--My problem:

I try to send a mail with turbine SimpleEmail or MailMessage
and have an exception with both:
javax.mail.NoSuchProviderException: No provider for Address type: rfc822

In my TurbineResources.properties the mail.server is
(mail.server=smtp.y-parc.ch)
And I don't  know where else do I have to set the provider or what it could
be.
--My code is
----------------------------------
public void doIt () throws Exception {

  SimpleEmail mySimpleEmail = new SimpleEmail();
  GregorianCalendar sendDate = new GregorianCalendar();

  mySimpleEmail.addTo("[EMAIL PROTECTED]","vchappuis");
  mySimpleEmail.setMsg("test");
  mySimpleEmail.setSubject("test");
  mySimpleEmail.setFrom("[EMAIL PROTECTED]","vchappuis");
  mySimpleEmail.setSentDate(sendDate.getTime());

  mySimpleEmail.send();
 }

---------------------------------------
protected void MailContact(RunData data) throws Exception
  {
    file://Body
   String body ="Les coordonn�es du nouveaux contact sont les suivantes."+
",  "+
               "Nom: "+ data.getParameters().getString("Lastname") + ",  "+
            "Pr�nom: "+ data.getParameters().getString("Surname") + ",  "+
            "Raison sociale: "+ data.getParameters().getString("Business") +
",  "+
      "Adresse: "+ data.getParameters().getString("Address") + ",  "+
      "No postal: "+ data.getParameters().getString("Npa") + ",  "+
      "Localit�: "+ data.getParameters().getString("City") + ",  "   +
      "Pays: "+ data.getParameters().getString("Country") +  ",  "+
      "T�l�phone: "+ data.getParameters().getString("Phone") +   ",  "+
      "E-mail: "+ data.getParameters().getString("Email") +  ",  " +
      "Commentaire(s): "+ data.getParameters().getString("Comment") ;


  MailMessage sm = new MailMessage();
  sm.setHost("smtp.y-parc.ch");
  sm.setFrom("[EMAIL PROTECTED]");
  sm.setTo("[EMAIL PROTECTED]");
  sm.setSubject("Nouveaux commerces e-comfree � valider");
  sm.setBody(body);
  sm.setDebug(true);
  sm.send();


 }

any idea ?

Thanks Annik









------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to