You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Arun <ar...@gmail.com> on 2007/10/04 17:07:34 UTC

Sending Mail from a Java WebApplication does not work

Hi,

I have configured sendmail at port 25 in ubuntu. It is working correctly as
I checked sending mails using a perl script as well as a javaprogram, but my
web application running in tomcat does not allow me to send a mail. It
simply does not give me any error at all. But it does not send the mail at
the same time. Is there a tomcat configuration that I need to tweak.? i m
usin tomcat 6.

-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Arun" <ar...@gmail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, October 04, 2007 7:33 PM
Subject: Re: Sending Mail from a Java WebApplication does not work


> Thanks johnny. I am grateful for the helping hand.

Are you using real FROM mail addresses.
I have a feeling if the from address doesnt match your domain name, will get 
sent to junk.
.... guessing ;)

>
> On 10/4/07, Johnny Kewl <jo...@kewlstuff.co.za> wrote:
>>
>>
>> ----- Original Message -----
>> From: "Arun" <ar...@gmail.com>
>> To: <us...@tomcat.apache.org>
>> Sent: Thursday, October 04, 2007 5:07 PM
>> Subject: Sending Mail from a Java WebApplication does not work
>>
>>
>> > Hi,
>> >
>> > I have configured sendmail at port 25 in ubuntu. It is working 
>> > correctly
>> > as
>> > I checked sending mails using a perl script as well as a javaprogram,
>> but
>> > my
>> > web application running in tomcat does not allow me to send a mail. It
>> > simply does not give me any error at all. But it does not send the mail
>> at
>> > the same time. Is there a tomcat configuration that I need to tweak.? i
>> m
>> > usin tomcat 6.
>>
>> I also struggled like crazy in the beginning.
>> If I remember correctly, Tomcat via JNDI will give you a session, but
>> thats
>> still a long way from automated mailing.
>> The next qustion is normally... it mails... but the web page waits for 
>> the
>> mail to go before refreshing....
>>
>> If you have a look here, you will find a little mailing class, and will
>> work
>> inside TC
>> http://coolharbor.100free.com/tool_mailer_server.htm
>>
>> Its an example in the POJO application server, but dont worry about that,
>> the code works outside the server as well, so just steal the class.
>>
>> Have Fun...
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> -- 
> Thanks
> Arun George
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
Thanks johnny. I am grateful for the helping hand.

On 10/4/07, Johnny Kewl <jo...@kewlstuff.co.za> wrote:
>
>
> ----- Original Message -----
> From: "Arun" <ar...@gmail.com>
> To: <us...@tomcat.apache.org>
> Sent: Thursday, October 04, 2007 5:07 PM
> Subject: Sending Mail from a Java WebApplication does not work
>
>
> > Hi,
> >
> > I have configured sendmail at port 25 in ubuntu. It is working correctly
> > as
> > I checked sending mails using a perl script as well as a javaprogram,
> but
> > my
> > web application running in tomcat does not allow me to send a mail. It
> > simply does not give me any error at all. But it does not send the mail
> at
> > the same time. Is there a tomcat configuration that I need to tweak.? i
> m
> > usin tomcat 6.
>
> I also struggled like crazy in the beginning.
> If I remember correctly, Tomcat via JNDI will give you a session, but
> thats
> still a long way from automated mailing.
> The next qustion is normally... it mails... but the web page waits for the
> mail to go before refreshing....
>
> If you have a look here, you will find a little mailing class, and will
> work
> inside TC
> http://coolharbor.100free.com/tool_mailer_server.htm
>
> Its an example in the POJO application server, but dont worry about that,
> the code works outside the server as well, so just steal the class.
>
> Have Fun...
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Arun" <ar...@gmail.com>
To: <us...@tomcat.apache.org>
Sent: Thursday, October 04, 2007 5:07 PM
Subject: Sending Mail from a Java WebApplication does not work


> Hi,
>
> I have configured sendmail at port 25 in ubuntu. It is working correctly 
> as
> I checked sending mails using a perl script as well as a javaprogram, but 
> my
> web application running in tomcat does not allow me to send a mail. It
> simply does not give me any error at all. But it does not send the mail at
> the same time. Is there a tomcat configuration that I need to tweak.? i m
> usin tomcat 6.

I also struggled like crazy in the beginning.
If I remember correctly, Tomcat via JNDI will give you a session, but thats 
still a long way from automated mailing.
The next qustion is normally... it mails... but the web page waits for the 
mail to go before refreshing....

If you have a look here, you will find a little mailing class, and will work 
inside TC
http://coolharbor.100free.com/tool_mailer_server.htm

Its an example in the POJO application server, but dont worry about that, 
the code works outside the server as well, so just steal the class.

Have Fun...







---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arun,

Arun wrote:
> Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
> arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp,
> pri=120522, relay=gmail-smtp-in.l.google.com. [66.249.83.114], dsn=2.0.0,
> stat=Sent (OK 1191517641 h9si2242792wxd)

Yup, it says sent. That's all your code can possibly do.

> It says that it is send . But still no mails..

Perhaps gmail's server is refusing to relay the message. Do you need to
use a special server or anything, or perhaps use TLS with authentication?

What about adding a Reply-To address and letting it bounce, so you can
see the reply? Or, does sendmail accept rejects from foreign servers and
deliver them somewhere? I would look for that.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBSYr9CaO5/Lv0PARAorWAKCibj/ZotDzWkZKkpM/JkM/0CNT/wCcChdD
Seotv/iKgIBg5r40UK2LjBE=
=r5GA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Joshua Fielek <jf...@centriccrm.com>.
We just went through this -- make sure you're not sending the mail from 
an IP address. gmail red flags anything sent from an ip address.

J

Arun wrote:
> Gabe,
> That is great.
> yes, It is sending mails to junk folder.
> Thanks a lot lol.
> How can I avoid it ? why does gmail treats this mail as spam?
> 
> We were palnning to move our application to a new server.
> I had written a build script using perl. Every thing went fine and build was
> successfull.
> We were trying to test it for user registration and no mails for ever. My PM
> will eat my head if it moves to junk folder. HELP!!!!!
> 
> 
> 
> 
> On 10/4/07, Gabe Wong <ga...@ngasi.com> wrote:
>> Arun,
>> Have you checked your gmail junk folder?
>>
>> Arun wrote:
>>> Chris,
>>>
>>> My mail.log looks like this.(tail mail.log). This is the log created
>> just
>>> now as i send from my webapp.
>>>
>>> Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
>>> arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01,
>> mailer=esmtp,
>>> pri=120522, relay= gmail-smtp-in.l.google.com. [66.249.83.114], dsn=
>> 2.0.0,
>>> stat=Sent (OK 1191517641 h9si2242792wxd)
>>>
>>> It says that it is send . But still no mails..
>>>
>>> On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Arun,
>>>>
>>>> Arun wrote:
>>>>
>>>>> I am using commons email and a class called SimpleEmail which is
>>>>>
>>>> extended
>>>>
>>>>> and used.
>>>>>
>>>> Then there is no Tomcat configuration to be changed. If you were
>> getting
>>>> permission errors (for instance, from running under a SecurityManager),
>>>> then you'd be getting exceptions all over the place.
>>>>
>>>>
>>>>> Here host name is localhost and portnumber is 25.
>>>>>
>>>> All I can suggest is adding more logging statements to convince
>> yourself
>>>> that the code is actually running.
>>>>
>>>> Make sure you check /all/ log files (if they exist): catalina.out,
>>>> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
>>>> forget to check the log file for sendmail (usually /var/log/mail).
>>>>
>>>> - -chris
>>>>
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.7 (MingW32)
>>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>>
>>>> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
>>>> HnmSz/Mc0a08gXL9d2CvP1g=
>>>> =zMxz
>>>> -----END PGP SIGNATURE-----
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> 

-- 
Joshua J. Fielek
Sr. Software Engineer
Centric CRM
223 East City Hall Ave., Suite 212
Norfolk, VA 23510
Phone  : (757) 627-3002x6656
Mobile : (757) 754-4462
Fax    : (757) 627-8773
Email  : jfielek@centriccrm.com
http://www.centriccrm.com


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
This was my first mail to apache tomcat users. This is fantastic
great. I express my hearty gratitude to  you all guys. That is clear
like water. Cool. I will ask my ISP to do this and forward this mail
as well.

I had not introduced myself. I am Arun George working as a lead
developer @ mobchannel.com. Some of the technoloies we use are struts
, spring and hibernate..

Guys,
Have A Good Day!


On 10/5/07, Mark Deneen <md...@gmail.com> wrote:
> I think that gmail is balking over the fact that "venus" does not
> resolve to 71.248.123.180, and the reverse record of 71.248.123.180
> resolves to static-71-248-123-180.bltmmd.east.verizon.net instead of
> "venus".
>
> Here's what you want in DNS:
> A "MX" (Mail) record to be set to something like "mail.mydomain.com"
> An "A" (Address) record for "mail.mydomain.com" which points to 71.248.123.180
> and
> A "PTR" (Reverse) record which maps 71.248.123.180 to mail.mydomain.com.
>
> Since a PTR record already exists for 71.248.123.180, verizon most
> likely controls this reverse zone.. so you're stuck.
>
> If you don't want your mail ending up in the junk folder, you either
> have to have control over your DNS zone along with the reverse
> delegation, or you have to use a third party service who can relay
> messages for you.
>
> Mark
>
> On 10/4/07, Arun <ar...@gmail.com> wrote:
> > Delivered-To: arun.george.1981@gmail.com
> > Received: by 10.70.74.8 with SMTP id w8cs511135wxa;
> >         Thu, 4 Oct 2007 10:07:22 -0700 (PDT)
> > Received: by 10.70.14.17 with SMTP id 17mr3648293wxn.1191517641836;
> >         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> > Return-Path: <adminsupport@MyDomain.com >
> > Received: from venus (static-71-248-123-180.bltmmd.east.verizon.net
> > [71.248.123.180])
> >         by mx.google.com with ESMTP id h9si2242792wxd.2007.10.04.10.07.21;
> >         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> > Received-SPF: neutral (google.com: 71.248.123.180 is neither permitted
> > nor denied by best guess record for domain of
> > adminsupport@MyDomain.com) client-ip=71.248.123.180;
> > Authentication-Results: mx.google.com; spf=neutral (google.com:
> > 71.248.123.180 is neither permitted nor denied by best guess record
> > for domain of adminsupport@MyDomain.com)
> > smtp.mail=adminsupport@MyDomain.com
> > Received: from venus (localhost [ 127.0.0.1])
> >     by venus (8.13.8/8.13.8/Debian-3) with ESMTP id l950p6C3017485
> >     for <ar...@gmail.com>; Thu, 4 Oct 2007 20:51:06 -0400
> > Message-ID: < 29484592.1191545466267.JavaMail.root@localhost>
> > Date: Thu, 4 Oct 2007 20:51:06 -0400 (EDT)
> > From: MyDomain AdminSupport <ad...@MyDomain.com>
> > To: Arun George < arun.george.1981@gmail.com>
> > Subject: Your MyDomain registration confirmation
> > Mime-Version: 1.0
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> >
> > You can copy paste this url in your browser and press
> > enter.http://ibaaz.com:80//useraccount/useraccountflow.do?dispatch=confirm&userid=16&confirmationcode=-2136050843
> >
> >
> > ============================================================================
> > I have changed the domain name to mydomain.com.
> > Remember that the webapp is not running on mydomain.com. Its running
> > on another domain say ' anotherdomain.com'. But the from address is
> > still admin@mydomain.com.
> > Guys give me some links to learn myself of what is happening when a
> > mail is send , what is this MX records and PTR records?
> >
> >
> > On 10/4/07, Arun <ar...@gmail.com> wrote:
> > >
> > > Delivered-To: arun.george.1981@gmail.com
> > > Received: by 10.70.74.8 with SMTP id w8cs511135wxa;
> > >         Thu, 4 Oct 2007 10:07:22 -0700 (PDT)
> > > Received: by 10.70.14.17 with SMTP id 17mr3648293wxn.1191517641836;
> > >         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> > > Return-Path: <adminsupport@MyDomain.com >
> > > Received: from venus (static-71-248-123-180.bltmmd.east.verizon.net [71.248.123.180])
> > >         by  mx.google.com with ESMTP id h9si2242792wxd.2007.10.04.10.07.21;
> > >         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> > > Received-SPF: neutral (google.com: 71.248.123.180  is neither permitted nor denied by best guess record for domain of adminsupport@MyDomain.com) client-ip=71.248.123.180;
> > > Authentication-Results:  mx.google.com; spf=neutral (google.com: 71.248.123.180 is neither permitted nor denied by best guess record for domain of  adminsupport@MyDomain.com) smtp.mail=adminsupport@MyDomain.com
> > > Received: from venus (localhost [ 127.0.0.1])
> > >     by venus (8.13.8/8.13.8/Debian-3) with ESMTP id l950p6C3017485
> > >     for <ar...@gmail.com>; Thu, 4 Oct 2007 20:51:06 -0400
> > > Message-ID: < 29484592.1191545466267.JavaMail.root@localhost>
> > > Date: Thu, 4 Oct 2007 20:51:06 -0400 (EDT)
> > > From: MyDomain AdminSupport <ad...@MyDomain.com>
> > > To: Arun George < arun.george.1981@gmail.com>
> > > Subject: Your MyDomain registration confirmation
> > > Mime-Version: 1.0
> > > Content-Type: text/plain; charset=us-ascii
> > > Content-Transfer-Encoding: 7bit
> > >
> > > You can copy paste this url in your browser and press enter.http://ibaaz.com:80//useraccount/useraccountflow.do?dispatch=confirm&userid=16&confirmationcode=-2136050843
> > >
> > >
> > > ============================================================================
> > > I have changed the domain name to mydomain.com.
> > > Remember that the webapp is not running on mydomain.com. Its running on another domain say ' anotherdomain.com'. But the from address is still admin@mydomain.com.
> > > Guys give me some links to learn myself of what is happening when a mail is send , what is this MX records and PTR records?
> > >
> > >
> > > On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> > >
> > > >  -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Arun,
> > > >
> > > > Arun wrote:
> > > > > It contains a link for user verification and a welcome message. Did the
> > > > > mail.log I mentioned points any hands to any problems?
> > > >
> > > > No, but the message itself including full headers (as seen by the
> > > > recipient) should tell the story.
> > > >
> > > > Can you post as much of the message as possible, including all of the
> > > > nasty headers? I'm not sure if gmail lets you browse message headers,
> > > > but they can tell a lot about a message.
> > > >
> > > > - -chris
> > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1.4.7 (MingW32)
> > > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> > > >
> > > > iD8DBQFHBS089CaO5/Lv0PARAu/HAKC2FXlV+GNDqfS/1le2B1ahTdKlbQCeL/r6
> > > > fOAWbzNwdLwSIjtS1gIrb0Q=
> > > > =AVHq
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > ---------------------------------------------------------------------
> > > > To start a new topic, e-mail: users@tomcat.apache.org
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail: users-help@tomcat.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks
> > > Arun George
> >
> >
> >
> > --
> > Thanks
> > Arun George
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Mark Deneen <md...@gmail.com>.
I think that gmail is balking over the fact that "venus" does not
resolve to 71.248.123.180, and the reverse record of 71.248.123.180
resolves to static-71-248-123-180.bltmmd.east.verizon.net instead of
"venus".

Here's what you want in DNS:
A "MX" (Mail) record to be set to something like "mail.mydomain.com"
An "A" (Address) record for "mail.mydomain.com" which points to 71.248.123.180
and
A "PTR" (Reverse) record which maps 71.248.123.180 to mail.mydomain.com.

Since a PTR record already exists for 71.248.123.180, verizon most
likely controls this reverse zone.. so you're stuck.

If you don't want your mail ending up in the junk folder, you either
have to have control over your DNS zone along with the reverse
delegation, or you have to use a third party service who can relay
messages for you.

Mark

On 10/4/07, Arun <ar...@gmail.com> wrote:
> Delivered-To: arun.george.1981@gmail.com
> Received: by 10.70.74.8 with SMTP id w8cs511135wxa;
>         Thu, 4 Oct 2007 10:07:22 -0700 (PDT)
> Received: by 10.70.14.17 with SMTP id 17mr3648293wxn.1191517641836;
>         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> Return-Path: <adminsupport@MyDomain.com >
> Received: from venus (static-71-248-123-180.bltmmd.east.verizon.net
> [71.248.123.180])
>         by mx.google.com with ESMTP id h9si2242792wxd.2007.10.04.10.07.21;
>         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> Received-SPF: neutral (google.com: 71.248.123.180 is neither permitted
> nor denied by best guess record for domain of
> adminsupport@MyDomain.com) client-ip=71.248.123.180;
> Authentication-Results: mx.google.com; spf=neutral (google.com:
> 71.248.123.180 is neither permitted nor denied by best guess record
> for domain of adminsupport@MyDomain.com)
> smtp.mail=adminsupport@MyDomain.com
> Received: from venus (localhost [ 127.0.0.1])
>     by venus (8.13.8/8.13.8/Debian-3) with ESMTP id l950p6C3017485
>     for <ar...@gmail.com>; Thu, 4 Oct 2007 20:51:06 -0400
> Message-ID: < 29484592.1191545466267.JavaMail.root@localhost>
> Date: Thu, 4 Oct 2007 20:51:06 -0400 (EDT)
> From: MyDomain AdminSupport <ad...@MyDomain.com>
> To: Arun George < arun.george.1981@gmail.com>
> Subject: Your MyDomain registration confirmation
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> You can copy paste this url in your browser and press
> enter.http://ibaaz.com:80//useraccount/useraccountflow.do?dispatch=confirm&userid=16&confirmationcode=-2136050843
>
>
> ============================================================================
> I have changed the domain name to mydomain.com.
> Remember that the webapp is not running on mydomain.com. Its running
> on another domain say ' anotherdomain.com'. But the from address is
> still admin@mydomain.com.
> Guys give me some links to learn myself of what is happening when a
> mail is send , what is this MX records and PTR records?
>
>
> On 10/4/07, Arun <ar...@gmail.com> wrote:
> >
> > Delivered-To: arun.george.1981@gmail.com
> > Received: by 10.70.74.8 with SMTP id w8cs511135wxa;
> >         Thu, 4 Oct 2007 10:07:22 -0700 (PDT)
> > Received: by 10.70.14.17 with SMTP id 17mr3648293wxn.1191517641836;
> >         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> > Return-Path: <adminsupport@MyDomain.com >
> > Received: from venus (static-71-248-123-180.bltmmd.east.verizon.net [71.248.123.180])
> >         by  mx.google.com with ESMTP id h9si2242792wxd.2007.10.04.10.07.21;
> >         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> > Received-SPF: neutral (google.com: 71.248.123.180  is neither permitted nor denied by best guess record for domain of adminsupport@MyDomain.com) client-ip=71.248.123.180;
> > Authentication-Results:  mx.google.com; spf=neutral (google.com: 71.248.123.180 is neither permitted nor denied by best guess record for domain of  adminsupport@MyDomain.com) smtp.mail=adminsupport@MyDomain.com
> > Received: from venus (localhost [ 127.0.0.1])
> >     by venus (8.13.8/8.13.8/Debian-3) with ESMTP id l950p6C3017485
> >     for <ar...@gmail.com>; Thu, 4 Oct 2007 20:51:06 -0400
> > Message-ID: < 29484592.1191545466267.JavaMail.root@localhost>
> > Date: Thu, 4 Oct 2007 20:51:06 -0400 (EDT)
> > From: MyDomain AdminSupport <ad...@MyDomain.com>
> > To: Arun George < arun.george.1981@gmail.com>
> > Subject: Your MyDomain registration confirmation
> > Mime-Version: 1.0
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> >
> > You can copy paste this url in your browser and press enter.http://ibaaz.com:80//useraccount/useraccountflow.do?dispatch=confirm&userid=16&confirmationcode=-2136050843
> >
> >
> > ============================================================================
> > I have changed the domain name to mydomain.com.
> > Remember that the webapp is not running on mydomain.com. Its running on another domain say ' anotherdomain.com'. But the from address is still admin@mydomain.com.
> > Guys give me some links to learn myself of what is happening when a mail is send , what is this MX records and PTR records?
> >
> >
> > On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> >
> > >  -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Arun,
> > >
> > > Arun wrote:
> > > > It contains a link for user verification and a welcome message. Did the
> > > > mail.log I mentioned points any hands to any problems?
> > >
> > > No, but the message itself including full headers (as seen by the
> > > recipient) should tell the story.
> > >
> > > Can you post as much of the message as possible, including all of the
> > > nasty headers? I'm not sure if gmail lets you browse message headers,
> > > but they can tell a lot about a message.
> > >
> > > - -chris
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.7 (MingW32)
> > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> > >
> > > iD8DBQFHBS089CaO5/Lv0PARAu/HAKC2FXlV+GNDqfS/1le2B1ahTdKlbQCeL/r6
> > > fOAWbzNwdLwSIjtS1gIrb0Q=
> > > =AVHq
> > > -----END PGP SIGNATURE-----
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Thanks
> > Arun George
>
>
>
> --
> Thanks
> Arun George
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
Delivered-To: arun.george.1981@gmail.com
Received: by 10.70.74.8 with SMTP id w8cs511135wxa;
        Thu, 4 Oct 2007 10:07:22 -0700 (PDT)
Received: by 10.70.14.17 with SMTP id 17mr3648293wxn.1191517641836;
        Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
Return-Path: <adminsupport@MyDomain.com >
Received: from venus (static-71-248-123-180.bltmmd.east.verizon.net
[71.248.123.180])
        by mx.google.com with ESMTP id h9si2242792wxd.2007.10.04.10.07.21;
        Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
Received-SPF: neutral (google.com: 71.248.123.180 is neither permitted
nor denied by best guess record for domain of
adminsupport@MyDomain.com) client-ip=71.248.123.180;
Authentication-Results: mx.google.com; spf=neutral (google.com:
71.248.123.180 is neither permitted nor denied by best guess record
for domain of adminsupport@MyDomain.com)
smtp.mail=adminsupport@MyDomain.com
Received: from venus (localhost [ 127.0.0.1])
    by venus (8.13.8/8.13.8/Debian-3) with ESMTP id l950p6C3017485
    for <ar...@gmail.com>; Thu, 4 Oct 2007 20:51:06 -0400
Message-ID: < 29484592.1191545466267.JavaMail.root@localhost>
Date: Thu, 4 Oct 2007 20:51:06 -0400 (EDT)
From: MyDomain AdminSupport <ad...@MyDomain.com>
To: Arun George < arun.george.1981@gmail.com>
Subject: Your MyDomain registration confirmation
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

You can copy paste this url in your browser and press
enter.http://ibaaz.com:80//useraccount/useraccountflow.do?dispatch=confirm&userid=16&confirmationcode=-2136050843


============================================================================
I have changed the domain name to mydomain.com.
Remember that the webapp is not running on mydomain.com. Its running
on another domain say ' anotherdomain.com'. But the from address is
still admin@mydomain.com.
Guys give me some links to learn myself of what is happening when a
mail is send , what is this MX records and PTR records?


On 10/4/07, Arun <ar...@gmail.com> wrote:
>
> Delivered-To: arun.george.1981@gmail.com
> Received: by 10.70.74.8 with SMTP id w8cs511135wxa;
>         Thu, 4 Oct 2007 10:07:22 -0700 (PDT)
> Received: by 10.70.14.17 with SMTP id 17mr3648293wxn.1191517641836;
>         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> Return-Path: <adminsupport@MyDomain.com >
> Received: from venus (static-71-248-123-180.bltmmd.east.verizon.net [71.248.123.180])
>         by  mx.google.com with ESMTP id h9si2242792wxd.2007.10.04.10.07.21;
>         Thu, 04 Oct 2007 10:07:21 -0700 (PDT)
> Received-SPF: neutral (google.com: 71.248.123.180  is neither permitted nor denied by best guess record for domain of adminsupport@MyDomain.com) client-ip=71.248.123.180;
> Authentication-Results:  mx.google.com; spf=neutral (google.com: 71.248.123.180 is neither permitted nor denied by best guess record for domain of  adminsupport@MyDomain.com) smtp.mail=adminsupport@MyDomain.com
> Received: from venus (localhost [ 127.0.0.1])
>     by venus (8.13.8/8.13.8/Debian-3) with ESMTP id l950p6C3017485
>     for <ar...@gmail.com>; Thu, 4 Oct 2007 20:51:06 -0400
> Message-ID: < 29484592.1191545466267.JavaMail.root@localhost>
> Date: Thu, 4 Oct 2007 20:51:06 -0400 (EDT)
> From: MyDomain AdminSupport <ad...@MyDomain.com>
> To: Arun George < arun.george.1981@gmail.com>
> Subject: Your MyDomain registration confirmation
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> You can copy paste this url in your browser and press enter.http://ibaaz.com:80//useraccount/useraccountflow.do?dispatch=confirm&userid=16&confirmationcode=-2136050843
>
>
> ============================================================================
> I have changed the domain name to mydomain.com.
> Remember that the webapp is not running on mydomain.com. Its running on another domain say ' anotherdomain.com'. But the from address is still admin@mydomain.com.
> Guys give me some links to learn myself of what is happening when a mail is send , what is this MX records and PTR records?
>
>
> On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> >  -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Arun,
> >
> > Arun wrote:
> > > It contains a link for user verification and a welcome message. Did the
> > > mail.log I mentioned points any hands to any problems?
> >
> > No, but the message itself including full headers (as seen by the
> > recipient) should tell the story.
> >
> > Can you post as much of the message as possible, including all of the
> > nasty headers? I'm not sure if gmail lets you browse message headers,
> > but they can tell a lot about a message.
> >
> > - -chris
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFHBS089CaO5/Lv0PARAu/HAKC2FXlV+GNDqfS/1le2B1ahTdKlbQCeL/r6
> > fOAWbzNwdLwSIjtS1gIrb0Q=
> > =AVHq
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
>
> --
> Thanks
> Arun George



-- 
Thanks
Arun George

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arun,

Arun wrote:
> It contains a link for user verification and a welcome message. Did the
> mail.log I mentioned points any hands to any problems?

No, but the message itself including full headers (as seen by the
recipient) should tell the story.

Can you post as much of the message as possible, including all of the
nasty headers? I'm not sure if gmail lets you browse message headers,
but they can tell a lot about a message.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBS089CaO5/Lv0PARAu/HAKC2FXlV+GNDqfS/1le2B1ahTdKlbQCeL/r6
fOAWbzNwdLwSIjtS1gIrb0Q=
=AVHq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
It contains a link for user verification and a welcome message. Did the
mail.log I mentioned points any hands to any problems?

On 10/4/07, David kerber <dc...@verizon.net> wrote:
>
> You're going to have to figure out what is triggering the spam blocker
> on this message.  Is the test message body the same as the real data?
> If not, have you tried sending real (or at least real-looking) body
> content.
>
> D
>
>
> Arun wrote:
> > Gabe,
> > That is great.
> > yes, It is sending mails to junk folder.
> > Thanks a lot lol.
> > How can I avoid it ? why does gmail treats this mail as spam?
> >
> > We were palnning to move our application to a new server.
> > I had written a build script using perl. Every thing went fine and build
> was
> > successfull.
> > We were trying to test it for user registration and no mails for ever.
> My PM
> > will eat my head if it moves to junk folder. HELP!!!!!
> >
> >
> >
> >
> > On 10/4/07, Gabe Wong <ga...@ngasi.com> wrote:
> >
> >> Arun,
> >> Have you checked your gmail junk folder?
> >>
> >> Arun wrote:
> >>
> >>> Chris,
> >>>
> >>> My mail.log looks like this.(tail mail.log). This is the log created
> >>>
> >> just
> >>
> >>> now as i send from my webapp.
> >>>
> >>> Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
> >>> arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01,
> >>>
> >> mailer=esmtp,
> >>
> >>> pri=120522, relay= gmail-smtp-in.l.google.com. [66.249.83.114], dsn=
> >>>
> >> 2.0.0,
> >>
> >>> stat=Sent (OK 1191517641 h9si2242792wxd)
> >>>
> >>> It says that it is send . But still no mails..
> >>>
> >>> On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> >>>
> >>>
> >>>> -----BEGIN PGP SIGNED MESSAGE-----
> >>>> Hash: SHA1
> >>>>
> >>>> Arun,
> >>>>
> >>>> Arun wrote:
> >>>>
> >>>>
> >>>>> I am using commons email and a class called SimpleEmail which is
> >>>>>
> >>>>>
> >>>> extended
> >>>>
> >>>>
> >>>>> and used.
> >>>>>
> >>>>>
> >>>> Then there is no Tomcat configuration to be changed. If you were
> >>>>
> >> getting
> >>
> >>>> permission errors (for instance, from running under a
> SecurityManager),
> >>>> then you'd be getting exceptions all over the place.
> >>>>
> >>>>
> >>>>
> >>>>> Here host name is localhost and portnumber is 25.
> >>>>>
> >>>>>
> >>>> All I can suggest is adding more logging statements to convince
> >>>>
> >> yourself
> >>
> >>>> that the code is actually running.
> >>>>
> >>>> Make sure you check /all/ log files (if they exist): catalina.out,
> >>>> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
> >>>> forget to check the log file for sendmail (usually /var/log/mail).
> >>>>
> >>>> - -chris
> >>>>
> >>>> -----BEGIN PGP SIGNATURE-----
> >>>> Version: GnuPG v1.4.7 (MingW32)
> >>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>>>
> >>>> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
> >>>> HnmSz/Mc0a08gXL9d2CvP1g=
> >>>> =zMxz
> >>>> -----END PGP SIGNATURE-----
> >>>>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by David kerber <dc...@verizon.net>.
You're going to have to figure out what is triggering the spam blocker 
on this message.  Is the test message body the same as the real data?  
If not, have you tried sending real (or at least real-looking) body content.

D


Arun wrote:
> Gabe,
> That is great.
> yes, It is sending mails to junk folder.
> Thanks a lot lol.
> How can I avoid it ? why does gmail treats this mail as spam?
>
> We were palnning to move our application to a new server.
> I had written a build script using perl. Every thing went fine and build was
> successfull.
> We were trying to test it for user registration and no mails for ever. My PM
> will eat my head if it moves to junk folder. HELP!!!!!
>
>
>
>
> On 10/4/07, Gabe Wong <ga...@ngasi.com> wrote:
>   
>> Arun,
>> Have you checked your gmail junk folder?
>>
>> Arun wrote:
>>     
>>> Chris,
>>>
>>> My mail.log looks like this.(tail mail.log). This is the log created
>>>       
>> just
>>     
>>> now as i send from my webapp.
>>>
>>> Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
>>> arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01,
>>>       
>> mailer=esmtp,
>>     
>>> pri=120522, relay= gmail-smtp-in.l.google.com. [66.249.83.114], dsn=
>>>       
>> 2.0.0,
>>     
>>> stat=Sent (OK 1191517641 h9si2242792wxd)
>>>
>>> It says that it is send . But still no mails..
>>>
>>> On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>>>
>>>       
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Arun,
>>>>
>>>> Arun wrote:
>>>>
>>>>         
>>>>> I am using commons email and a class called SimpleEmail which is
>>>>>
>>>>>           
>>>> extended
>>>>
>>>>         
>>>>> and used.
>>>>>
>>>>>           
>>>> Then there is no Tomcat configuration to be changed. If you were
>>>>         
>> getting
>>     
>>>> permission errors (for instance, from running under a SecurityManager),
>>>> then you'd be getting exceptions all over the place.
>>>>
>>>>
>>>>         
>>>>> Here host name is localhost and portnumber is 25.
>>>>>
>>>>>           
>>>> All I can suggest is adding more logging statements to convince
>>>>         
>> yourself
>>     
>>>> that the code is actually running.
>>>>
>>>> Make sure you check /all/ log files (if they exist): catalina.out,
>>>> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
>>>> forget to check the log file for sendmail (usually /var/log/mail).
>>>>
>>>> - -chris
>>>>
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.7 (MingW32)
>>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>>
>>>> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
>>>> HnmSz/Mc0a08gXL9d2CvP1g=
>>>> =zMxz
>>>> -----END PGP SIGNATURE-----
>>>>         



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
Nope. It contains a link for user verification and a welcome message.

On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Aron,
>
> Arun wrote:
> > Gabe,
> > That is great.
> > yes, It is sending mails to junk folder.
> > Thanks a lot lol.
> > How can I avoid it ? why does gmail treats this mail as spam?
>
> What about the contents of the message? Do they look sketchy?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHBSbJ9CaO5/Lv0PARAhtrAKDALH/8oeW6Js4ZTCjCk/cBKPX4VACffjNJ
> IL6G9v3LgyZ6F0L56DgSvy4=
> =fDud
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aron,

Arun wrote:
> Gabe,
> That is great.
> yes, It is sending mails to junk folder.
> Thanks a lot lol.
> How can I avoid it ? why does gmail treats this mail as spam?

What about the contents of the message? Do they look sketchy?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBSbJ9CaO5/Lv0PARAhtrAKDALH/8oeW6Js4ZTCjCk/cBKPX4VACffjNJ
IL6G9v3LgyZ6F0L56DgSvy4=
=fDud
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
My from address for mail is say admin@somdomain.com. But the webapp is now
running on another server with a different domain , say anotherdomain , but
my from address still has admin@somdomain.com. Is this the reason.


On 10/4/07, tomcat <tc...@1bigthink.com> wrote:
>
> At 01:30 PM 10/4/2007, you wrote:
>
> >Gabe,
> >That is great.
> >yes, It is sending mails to junk folder.
> >Thanks a lot lol.
> >How can I avoid it ? why does gmail treats this mail as spam?
> >
> >We were palnning to move our application to a new server.
> >I had written a build script using perl. Every thing went fine and build
> was
> >successfull.
> >We were trying to test it for user registration and no mails for ever. My
> PM
> >will eat my head if it moves to junk folder. HELP!!!!!
> >
> >
> >
>
> We send through the localhost sendmail to the mail server that serves
> mail for the host's domain. Sendmail is already set to only relay
> localhost on later 8.12 versions and up, making this setup easy. The
> mail server for the domain needs to be modified to accept mail from
> your application server.
>
> Your mail may be getting flagged for lack of RDNS (PTR record for the
> MX server). A lot of ISPs will flag or refuse your mail if you do not
> have MX and PTR records for your server. AOL immediately comes to mind.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by tomcat <tc...@1bigthink.com>.
At 01:30 PM 10/4/2007, you wrote:

>Gabe,
>That is great.
>yes, It is sending mails to junk folder.
>Thanks a lot lol.
>How can I avoid it ? why does gmail treats this mail as spam?
>
>We were palnning to move our application to a new server.
>I had written a build script using perl. Every thing went fine and build was
>successfull.
>We were trying to test it for user registration and no mails for ever. My PM
>will eat my head if it moves to junk folder. HELP!!!!!
>
>
>

We send through the localhost sendmail to the mail server that serves 
mail for the host's domain. Sendmail is already set to only relay 
localhost on later 8.12 versions and up, making this setup easy. The 
mail server for the domain needs to be modified to accept mail from 
your application server.

Your mail may be getting flagged for lack of RDNS (PTR record for the 
MX server). A lot of ISPs will flag or refuse your mail if you do not 
have MX and PTR records for your server. AOL immediately comes to mind.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
Gabe,
That is great.
yes, It is sending mails to junk folder.
Thanks a lot lol.
How can I avoid it ? why does gmail treats this mail as spam?

We were palnning to move our application to a new server.
I had written a build script using perl. Every thing went fine and build was
successfull.
We were trying to test it for user registration and no mails for ever. My PM
will eat my head if it moves to junk folder. HELP!!!!!




On 10/4/07, Gabe Wong <ga...@ngasi.com> wrote:
>
> Arun,
> Have you checked your gmail junk folder?
>
> Arun wrote:
> > Chris,
> >
> > My mail.log looks like this.(tail mail.log). This is the log created
> just
> > now as i send from my webapp.
> >
> > Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
> > arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01,
> mailer=esmtp,
> > pri=120522, relay= gmail-smtp-in.l.google.com. [66.249.83.114], dsn=
> 2.0.0,
> > stat=Sent (OK 1191517641 h9si2242792wxd)
> >
> > It says that it is send . But still no mails..
> >
> > On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> >
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Arun,
> >>
> >> Arun wrote:
> >>
> >>> I am using commons email and a class called SimpleEmail which is
> >>>
> >> extended
> >>
> >>> and used.
> >>>
> >> Then there is no Tomcat configuration to be changed. If you were
> getting
> >> permission errors (for instance, from running under a SecurityManager),
> >> then you'd be getting exceptions all over the place.
> >>
> >>
> >>> Here host name is localhost and portnumber is 25.
> >>>
> >> All I can suggest is adding more logging statements to convince
> yourself
> >> that the code is actually running.
> >>
> >> Make sure you check /all/ log files (if they exist): catalina.out,
> >> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
> >> forget to check the log file for sendmail (usually /var/log/mail).
> >>
> >> - -chris
> >>
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.7 (MingW32)
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>
> >> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
> >> HnmSz/Mc0a08gXL9d2CvP1g=
> >> =zMxz
> >> -----END PGP SIGNATURE-----
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by Gabe Wong <ga...@ngasi.com>.
Arun,
Have you checked your gmail junk folder?

Arun wrote:
> Chris,
>
> My mail.log looks like this.(tail mail.log). This is the log created just
> now as i send from my webapp.
>
> Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
> arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp,
> pri=120522, relay=gmail-smtp-in.l.google.com. [66.249.83.114], dsn=2.0.0,
> stat=Sent (OK 1191517641 h9si2242792wxd)
>
> It says that it is send . But still no mails..
>
> On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>   
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Arun,
>>
>> Arun wrote:
>>     
>>> I am using commons email and a class called SimpleEmail which is
>>>       
>> extended
>>     
>>> and used.
>>>       
>> Then there is no Tomcat configuration to be changed. If you were getting
>> permission errors (for instance, from running under a SecurityManager),
>> then you'd be getting exceptions all over the place.
>>
>>     
>>> Here host name is localhost and portnumber is 25.
>>>       
>> All I can suggest is adding more logging statements to convince yourself
>> that the code is actually running.
>>
>> Make sure you check /all/ log files (if they exist): catalina.out,
>> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
>> forget to check the log file for sendmail (usually /var/log/mail).
>>
>> - -chris
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.7 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
>> HnmSz/Mc0a08gXL9d2CvP1g=
>> =zMxz
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Ken Bowen <kb...@als.com>.
Sun's JavaMail (mail.jar -- you need activation.jar too) does a good job 
of simple mail sending (and it has lots of nice
debugging for figuring out just how far things got).  My app uses an 
AppListener which starts a single
app-wide thread which manages a mail queue.  Any request/action which 
needs to send email simply
configures a mail bean (address, name, etc.) and puts it in the queue.  
The action can then return
immediately (refreshing the page or forwarding whereever it needs to 
next).  The queue looks
pretty much like standard textbook examples (e.g. Arnold/Gosling/Holmes, 
Java 3rd Ed.)

HTH
Ken Bowen

Arun wrote:
> Chris,
>
> My mail.log looks like this.(tail mail.log). This is the log created just
> now as i send from my webapp.
>
> Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
> arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp,
> pri=120522, relay=gmail-smtp-in.l.google.com. [66.249.83.114], dsn=2.0.0,
> stat=Sent (OK 1191517641 h9si2242792wxd)
>
> It says that it is send . But still no mails..
>
> On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>   
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Arun,
>>
>> Arun wrote:
>>     
>>> I am using commons email and a class called SimpleEmail which is
>>>       
>> extended
>>     
>>> and used.
>>>       
>> Then there is no Tomcat configuration to be changed. If you were getting
>> permission errors (for instance, from running under a SecurityManager),
>> then you'd be getting exceptions all over the place.
>>
>>     
>>> Here host name is localhost and portnumber is 25.
>>>       
>> All I can suggest is adding more logging statements to convince yourself
>> that the code is actually running.
>>
>> Make sure you check /all/ log files (if they exist): catalina.out,
>> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
>> forget to check the log file for sendmail (usually /var/log/mail).
>>
>> - -chris
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.7 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
>> HnmSz/Mc0a08gXL9d2CvP1g=
>> =zMxz
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
>   

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
Chris,

My mail.log looks like this.(tail mail.log). This is the log created just
now as i send from my webapp.

Oct  4 20:51:07 venus sm-mta[17487]: l950p6C3017485: to=<
arun.george.1981@gmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp,
pri=120522, relay=gmail-smtp-in.l.google.com. [66.249.83.114], dsn=2.0.0,
stat=Sent (OK 1191517641 h9si2242792wxd)

It says that it is send . But still no mails..

On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Arun,
>
> Arun wrote:
> > I am using commons email and a class called SimpleEmail which is
> extended
> > and used.
>
> Then there is no Tomcat configuration to be changed. If you were getting
> permission errors (for instance, from running under a SecurityManager),
> then you'd be getting exceptions all over the place.
>
> > Here host name is localhost and portnumber is 25.
>
> All I can suggest is adding more logging statements to convince yourself
> that the code is actually running.
>
> Make sure you check /all/ log files (if they exist): catalina.out,
> localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
> forget to check the log file for sendmail (usually /var/log/mail).
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
> HnmSz/Mc0a08gXL9d2CvP1g=
> =zMxz
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arun,

Arun wrote:
> I am using commons email and a class called SimpleEmail which is extended
> and used.

Then there is no Tomcat configuration to be changed. If you were getting
permission errors (for instance, from running under a SecurityManager),
then you'd be getting exceptions all over the place.

> Here host name is localhost and portnumber is 25.

All I can suggest is adding more logging statements to convince yourself
that the code is actually running.

Make sure you check /all/ log files (if they exist): catalina.out,
localhost*.log|out yourapp_log_[date].txt, log4j.log etc. Also don't
forget to check the log file for sendmail (usually /var/log/mail).

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBRHq9CaO5/Lv0PARAlY2AKCuP2kJgQeKex3CFIIQHOrmEpiONgCeJhvP
HnmSz/Mc0a08gXL9d2CvP1g=
=zMxz
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Sending Mail from a Java WebApplication does not work

Posted by Arun <ar...@gmail.com>.
Chris,

I am using commons email and a class called SimpleEmail which is extended
and used.
I have set the host name and port number in the constructor of
EmailMessenger (extends SimpleEmail)
public EmailMessenger() {
        super();
        setHostName(emailConfig.getHostName().trim());
        setSmtpPort(Integer.parseInt(emailConfig.getSmtpPort().trim()));
    }

and have a send function ..

 public void sendMessage(QuickMessage message) {
        List<UserAccount> userAccounts = message.getRecipientAddresses();
        List<UserAccount> senders = message.getSenderAddresses();
        if (null == userAccounts)
            return;
        for (int i = 0; i < userAccounts.size(); i++) {
            UserAccount recipient = userAccounts.get(i);
            try {
                addTo(recipient.getUserEmail(), recipient.getUserFirstName()
                        + " " + recipient.getUserLastName());

            } catch (Exception e) {
                LOGGER.error("Failed to add recipient ", e);
            }
        }
        if (null != senders && senders.size() > 0) {
            UserAccount sender = (UserAccount) senders.get(0);
            try {
                setFrom(sender.getUserEmail(), sender.getUserFirstName() + "
"
                        + sender.getUserLastName());
            } catch (EmailException e) {
                LOGGER.error("Failed to send Sender", e);
            }
        }
        this.setSubject(message.getSubject());
        try {
            LOGGER.debug(message.getMessage());
            this.setMsg(message.getMessage());

        } catch (EmailException e) {
            LOGGER.error("Failed to send recipient", e);
        }
        try {
            this.send();
        } catch (EmailException e) {
            LOGGER.error("Failed to send recipient", e);
        }

    }

Here host name is localhost and portnumber is 25.

On 10/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Arun,
>
> Arun wrote:
> > I have configured sendmail at port 25 in ubuntu. It is working correctly
> as
> > I checked sending mails using a perl script as well as a javaprogram,
> but my
> > web application running in tomcat does not allow me to send a mail. It
> > simply does not give me any error at all. But it does not send the mail
> at
> > the same time. Is there a tomcat configuration that I need to tweak.? i
> m
> > usin tomcat 6.
>
> As Tomcat doesn't have any built-in email sending abilities, we'd have
> to see the code you are using to attempt to send an email.
>
> No email message + no log messages/errors usually = you aren't actually
> trying to send the message. :(
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHBQ8d9CaO5/Lv0PARAk1zAJ4+5g5V9jC7AOLiqk3XpBcSztLqtACfchjN
> aUPGuv30RkIzp3NNQZcuOyQ=
> =Xe+u
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Sending Mail from a Java WebApplication does not work

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arun,

Arun wrote:
> I have configured sendmail at port 25 in ubuntu. It is working correctly as
> I checked sending mails using a perl script as well as a javaprogram, but my
> web application running in tomcat does not allow me to send a mail. It
> simply does not give me any error at all. But it does not send the mail at
> the same time. Is there a tomcat configuration that I need to tweak.? i m
> usin tomcat 6.

As Tomcat doesn't have any built-in email sending abilities, we'd have
to see the code you are using to attempt to send an email.

No email message + no log messages/errors usually = you aren't actually
trying to send the message. :(

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBQ8d9CaO5/Lv0PARAk1zAJ4+5g5V9jC7AOLiqk3XpBcSztLqtACfchjN
aUPGuv30RkIzp3NNQZcuOyQ=
=Xe+u
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org