| Autor |
Mensagem |
|
|
Excelente Post, mas estou com alguns problemas.
Será que alguém me poderia ajudar?
O envio de e-mail funciona perfeitamente, mas quando tento colocar um attachment, surge um erro, como se não conseguisse encontrar a classe
"email.attach"
importei tudo correctamente, mas é impossível colocar o attach no e-mail.
Consigo criar o attach desta forma:
EmailAttachment attachment = new EmailAttachment();
attachment.setPath(filePath+"teste.pdf");
attachment.setDisposition(EmailAttachment.ATTACHMENT);
attachment.setDescription("Picture of John");
attachment.setName("John");
... mas surge sempre um erro em:
email.attach(attachment);
que é o seguinte:
symbol : method attach (org.apache.commons.mail.EmailAttachment)
location: class org.apache.commons.mail.SimpleEmail
email.attach(attachment);
Já alguem teve este problema?
Agradeço alguma ajuda
|
 |
|
|
|
|