Announcement Announcement Module
Collapse
No announcement yet.
JavaMail & Tomcat on Redhat problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaMail & Tomcat on Redhat problem

    Hi,
    I am having trouble sending mail with javamail from Tomcat on Linux.

    1. My standalone test works fine.
    2. Sending mail from Tomcat 5.5.9 on Windows XP work fine
    3. Sending mail from Tomcat 5.5.12 on Fedora does not work

    The strange thing is that I get no exceptions. I tried putting activation.jar and mail.jar into my tomcat/common/endorsed directory, but that didn't help.

    Any ideas why tomcat on Linux would be special? I'm thinking it's security related ...

    Thanks in advance.
    --Jonathan

    (the From is set to a valid from address)

    Code:
    public ModelAndView defaultAction(HttpServletRequest request, HttpServletResponse response) throws Exception {
    		String email = request.getParameter("email");
    		SimpleMailMessage msg = new SimpleMailMessage();
    		msg.setTo(email);
    		msg.setSubject("Some subject");
    		msg.setFrom("[email protected]");
    		msg.setText("Some message");
    		_mailSender.send(msg);
    		return new ModelAndView("sent");
    	}
    And _mailSender is set up in the appcontext with:
    Code:
    	<bean name="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    		<property name="host" value="smtp.bizmail.yahoo.com"/>
    		<property name="port" value="587"/>
    		<property name="username" value="xxxxxxxxxxxxxxxx"/>
    		<property name="password" value="xxxxxxxxxxxxxxxx"/>
    		<property name="javaMailProperties">
    			<props>
    				<prop key="mail.smtp.auth">true</prop>
    			</props>
    		</property> 
    	</bean>
    Last edited by jsheena; Nov 15th, 2005, 08:29 PM.

  • #2
    Resolved ... I think

    I believe the problem is that Yahoo thinks I'm sending spam, so it's blocking my emails. Frustrating.
    --Jonathan

    Comment

    Working...
    X