either you enable authentication for James (and use it from your
client) or you add the client IP to the <authorizedAddresses>
configuration.

Stefano

2009/11/13 pady-geazy <[email protected]>:
>
> Hi Norman,
>
> Thanks for your reply. I tried setting the "from" address alone to my gmail
> account. And tried to use my server ( with the credentials ) to send mail.
> But it fails with this exception -
>
> Here is the debug log output:
>
> DEBUG SMTP: connected to host "mail.geazy.com", port: 25
>
> EHLO padydev
> 250-PRABHA Hello padydev ...
> 250-AUTH LOGIN PLAIN
> 250-AUTH=LOGIN PLAIN
> 250-PIPELINING
> 250 ENHANCEDSTATUSCODES
> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
> DEBUG SMTP: Found extension "AUTH=LOGIN", arg "PLAIN"
> DEBUG SMTP: Found extension "PIPELINING", arg ""
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Attempt to authenticate
> AUTH LOGIN
> ...
> ..
> ...
> 235 Authentication Successful
> DEBUG SMTP: use8bit false
> MAIL FROM:<padysrini  at gmail dot com>
> 250 2.1.0 Sender <padysrini  at gmail dot com>OK
> RCPT TO: <padysrini  at hotmail dot com>
> 503 5.7.1 Incorrect Authentication for Specified Email Address
> DEBUG SMTP: Invalid Addresses
> DEBUG SMTP:   "padysrini  at hotmail dot com"<padysrini  at hotmail dot com>
> DEBUG SMTP: Sending failed because of invalid destination addresses
> RSET
> 250 2.0.0 OK
> javax.mail.SendFailedException: Invalid Addresses;
>  nested exception is:
> com.sun.mail.smtp.SMTPAddressFailedException: 503 5.7.1 Incorrect
> Authentication for Specified Email Address
>
> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1294)
> at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:635)
> at javax.mail.Transport.send0(Transport.java:189)
> at javax.mail.Transport.send(Transport.java:118)
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
> at org.apache.commons.mail.Email.send(Email.java:1163)
> at
> com.geazy.frames.server.utils.ServerUtils.sendHtmlEmail(ServerUtils.java:151)
> at com.geazy.frames.server.utils.ServerUtils.main(ServerUtils.java:296)
> Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 503 5.7.1 Incorrect
> Authentication for Specified Email Address
>
> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1145)
> ... 7 more
> QUIT
>
>
> I use apache commons mail to send mail. Here is the code:
>
>  HtmlEmail email = new HtmlEmail();
>
>  email.setHostName(info.mailserver);
>  email.setAuthentication(info.username, info.password);
>  email.setSmtpPort(info.smtpport);
>  email.setFrom("padysrini  at gmail dot com");
>  email.addTo("padysrini  at hotmail dot com");
>  email.setSubject(subject);
>
>  email.setHtmlMsg(html);
>
>  email.setDebug(true);
>
>  email.send();
>
>
> Thanks
>
> pady
>
>
> ----- Original Message ----- From: "Norman Maurer" <[email protected]>
> To: "James Users List" <[email protected]>
> Sent: Friday, November 13, 2009 1:24 AM
> Subject: Re: simple beginner question...
>
>
>> I think there is no need for aspecial mailet. Just Set the Mail from
>> and from headers to the senderaddress you want to use.
>>
>> Bye
>> norman
>> 2009/11/12, pady-geazy <[email protected]>:
>>>
>>>
>>> I have a requirement in my app as follows -
>>>
>>> 1. A user registers with my app, and registers an email address. ( "a at
>>> gmail dot com" )
>>>
>>> 2. The app sometimes has to send emails on behalf of the user.
>>>
>>> 3. I have James email server which accepts connections from "appdomain
>>> dot
>>> com".
>>>
>>> 4. In the above scenario, today, the app sends the email using the sender
>>> as
>>> "app at appdomain dot com"
>>>
>>> 5. But I would like James to process the email as the sender as "app at
>>> appdomain dot com" ( thus doing smtp auth ) but then forward the emails
>>> using the sender as "a at gmail dot com"
>>>
>>>
>>> Can this be done with a mailet ?
>>>
>>>
>>> Thanks
>>>
>>> pady

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to