could anybody tell me if it is possible to send email from localhost using JBoss AS-5.1 + Seam-2.2?
I've tryed launching mail example which goes with Seam, but the result is unsatisfactory.
Clicking the "Send Plain Text Email" button leads to the following message:
Email sending failed: Could not
connect to SMTP host: localhost, port:
2525
However, sending a letter "from inside a servlet" gives me a success page. Alas, no email really comes to the target address.
The example page says I could have firewall enabled, which might block email sending. But I haven't installed any firewalls or enabled the existing ones. My OS is ubuntu-9.04. As far as I know, the default firewall configuration tool for this system is ufw and it is disabled by default.
Does anybody know how to deal with the situation?
UPD:
Suppose, I should clarify my message. As for now, I try to send email via seam example application and all the errors and buttons I mentioned above refer to this example, not my own program.
Here's the screenshot:
mail example http://pics.livejournal.com/emanemos/pic/00011asb
JBossAS deploys a mail service as part of its standard configuration. The mail service takes the form of a javax.mail.Session, and is bound to JNDI under java:/Mail. Applications can make use of this mail service in order to send mail via SMTP.
My guess is that your seam app is trying to send mail by one method, and your servlet app by another method. Judging by the error message you're getting the servlet app is doing it using the JBossAS mail service, and the seam app is trying to do it all itself.
In order to configure the JBoss mail service, you need to edit the deploy/mail-service.xml file under the server directory.
As for the Seam app, you need to find out how it's doing mail handling, and configure it seperately to the JBossAS mail service. Better yet, change it to use the JBossAS mail service.
Related
We are trying to send email from an AEM Service using MessageGatewayService API. The weird part is, it is working on all lower environment and including in our local aem instance but it is not working only in Live servers. We verified the below things
Verified org.apache.sling.healthcheck: smtpMailService service
(/system/console/jmx/org.apache.sling.healthcheck%3Aname%3DsmtpMailService%2Ctype%3DHealthCheck),
it says “The E-mail Service appears to be working properly. Verify
the health check e-mail was sent to [ healthcheck#example.com ]”
Verified that the smtp host is open with port number using telnet from both author and publish servers
Restarted Day Communique 5 Mailer com.day.cq.cq-mailer bundle
Error Message:-
com.day.cq.mailer.MailingException: Invalid mail service configuration.
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:270)
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:45)
Is there any additional configuration to verify?
This problem got resolved after restarting AEM servers
I had a server running Zimbra 8.6 and it was configured to send via any one of five external relays based upon which one of my external accounts I was sending from. This worked great until I had a server crash and rebuilt this one using the latest Zimbra 8.7.
I have read and researched and tried everything I had done for my old 8.6 system and I simply cannot get this to work! When I try to send an email from the web client to gmail I get a warning from gmail that my server's IP address and domain are not allowed to relay since they are unauthenticated. According to my postfix configuration I should be authenticating using my own gmail credentials. But, the web client seems to ignore this.
When I try logging in directly on the Zimbra box I can use sendmail with the -tf parameters to mock up an email from one of my addresses to gmail and it works just fine. It is sent and looks like it came from the proper relay domain.
Is sender dependent relaying broken on 8.7? Does it work for anyone?
Welp, I gave up and set my server up to use gmail as the external relay for all accounts, and in my admin console I set my user account to be able to send from all of my external email addresses (specifying each of them there).
Now it properly relays through gmail and still shows each message as coming 'from' the external account I select in the new message window.
Maybe this will help someone with a similar issue.
I have an application that uses camel to send email. There is a greenmail server set up in our environment. The testers testing the service need to be able to view the emails sent, to verify that the html is formatted correctly.
There doesn't seem to be an obvious way to point a browser at the greenmail server to view the email.
Note that we use wildfly, and JMX with wildfly and dockers is not reliable. Is there something besides jmx?
Use Thunderbird client. Set it up so that it uses pop3 and your server/port that hosts your greenmail.
You can create a separate user and specify it in CC for your mail so that the observation of the mail would not impact the core process you test.
Here is more detailed post on how to setup Thunderbird with Greenmail.
Wondering if we have options for a failing smtp mail at "localhost" after changing DNS host.
The problem setup is this:
SMTP mail is being sent from a server, with mail being configured on the server itself. Originally, server was host of DNS domain as well as web app.
Using JavaMail, a request is sent to "localhost" without any authentication
The DNS settings have changed, server hosting web app is no longer the "from" email address
The Java web app cannot be modified and is still sending to "localhost"
Question: Do we have any options?
I'd like to intercept the "localhost" smtp mail request and forward it along to our domain's mail server, with new credentials, but am unsure if that is possible. A stand-alone script to watch for those requests?
We did receive the suggestion to edit our DNS settings on the new hosting and add "MX" and "A" records, but that would require a change of source code, which is not an option at this time.
Thanks!
If there's no SMTP server running on localhost, and you just want to redirect mail to another mail server without authentication, you could use a simple "proxy/tunnel" using something like the "netcat" program.
If there is an SMTP server running on localhost, you might be able to configure it to forward all messages to your other mail server.
Otherwise, is it possible to change the properties used by JavaMail in your web app, without changing the source code? For example, do the properties come from a file or from System.getProperties()?
I have a site, which has a server with "Parallels Plesk Panel" installed. I want to send an email from that site a "Contact Us" message to info#domain.com email.
The problem is that this email was already created by one of the programmers using the google mail system (apparently you can create accounts there with a domain name different from gmail.com).
So now, the server rejects my message, telling me that it can't find an email with this name. It works fine when I send to any other domain, but when sending to the same one, it fails. I've created another email info2#domain.com and sent emails there and it works.
My question now is, how do I send emails to the existent info#domain.com which is already created in gmail without making the server block me. One of the options I saw at this panel is to redirect the request for that email to another mailing system (and to specify its IP). Maybe that would help if I would to put there gmails IP?
Thanks.
EDIT:
Using my contact us form I am sending an email to info#domain.com. I get an SMTP error 550, can't find the mail box. When sending to anything but #domain.com it works. When adding that email to my server, it is also fine.
Now, the previous programmer already created info#domain.com, but not with our plesk panel, but using gmail server. Apparently, using gmail you can create an email of the type info#domain.com and not just info#gmail.com. The obvious problem is then that I try to send to this email. It sees that the server is domain.com and tries to find it there (same domain as the site from which I send the message). It fails and gives me the 550 error.
I want the server to send the email with that message to info#domain.com which is actually on gmail.
if I understand correctly, your problem is that two servers think they host the maildomain: your plesk server and gmail.
solution: disable local mail delivery for that domain on the plesk server and make sure plesk can correctly resolve the mx records of that domain , runing dig mx +short domain.com on the plesk server should return a google owned hostname, not the local hostname.
I don't own a plesk server, so I can't tell how how exactly to disable the mail domain, but a quick google search returns: http://www.serveridol.com/2011/03/16/disabling-email-service-for-a-domain-in-plesk/
http://search.yahoo.com/search?p=email+form+service&ei=UTF-8&fr=chr-greentree_ff&type=827316
try a remote email form service. most hosting companies' mail servers are local. to do this, you would have to make your own .htaccess file which contains php.ini mail server settings. i THINK this is correct. you can install php yourself to see what those settings are.
this is something you will probably have to do through the web hosting control panel.
and by the way, XHTML is served up as HTML unless you configure the server to serve XHTML up as XHTML. so use HTML when possible unless you know how to do that. here's how.
http://jesusnjim.com/web-design/setup-test-server.html