I have to automate sending mail and check whether they have been delivered as expected. Inorder to do that i am using mailHog(similar to mailCatcher). I have installed them but i don't know how to make my application send mail to this service instead of normal email sending.
They say that you have to configure your SMTP port to 1025 instead of 25(default). Even after this i am not able to capture those sent mails. Do i need to change my outgoing server name or what else should i do??
This is my web.config file code:
<add key="SmtpServerPort" value="1025" />
<add key="SmtpEmailServer" value="BLRCSWEXV01.in.corp.xxxx.com" />
PS: I am using protractor to write E2E tests. And i dont want to use mailListener, because it slows my test drastically and even it is not able to capture the mails
Have you installed MailHog on BLRCSWEXV01.in.corp.xxxx.com or is it on an other machine? You need to point both, the server and the port to your MailHog instance.
Related
I am trying to set up the most simple email server on an Amazon Linux 2 host for simple outbound mail (e.g. sending system messages). Following instructions on the net, I have installed mailx and sendmail. I am not committed to either package, I just want a simple setup with a minimal footprint. I have no problem switching to postfix if that is a better solution.
For configuration I have made the following changes.
/etc/sysconfig/sendmail:
DAEMON=no
/etc/mail/submit.cf (hostname obfuscated):
D{MTAHost}smtp.******.com
This works fine, and I am able to receive mail that is sent from the system.
There is a wrinkle. The anacron process is sending mail to the root account. However, rather than the mail being kept internal to the system it is being sent to the SMTP server. The SMTP server sends the message back to my host, which doesn't accept mail, and a loop is created when an 'undeliverable' message is send back to root on the host that doesn't accept mail.
How can I configure my system so email to root stays local and is not sent to the SMTP server? Any other 'best practices' suggestions would be welcome as well. And again, if switching to postfix is better, I am willing to do so (but will need configuration guidance).
I'm setting up an Alfresco AWS instance and trying to configure inbound email.
As per the documentation I've configured it, hosted the Alfresco mail server on port 1025, set up an iptable rule to forward port 25 --> 1025, set up an folder in Alfresco with the alias 'dropoff' and added my work email as an allowed user for sending emails. I've also ensured all the ports are open on the EC2 instance
So far so good. If I test everything from my local computer with telnet:
helo mywork.com
mail from:myname#mywork.com
rcpt to:dropoff#alfresco.mywork.com
data
From: adinihan#mywork.com
Subject: test mail from command line
this is test number 1
sent from linux box
.
Then it works. I look in the Alfresco folder and there's the test email document. However, if I use Gmail and sign into myname#mywork.com and send an email through Gmail, then it doesn't work. It sends alright and there's nothing in Alfresco logging, however the document just never appears in the Alfresco folder. The from/to address is the same as the telnet command's one.
Since I can telnet from my local computer to the instance I assume it's not an issue with ports on the EC2 instance. Why would telnet work but sending it via Gmail not?
EDIT: got an email back from Google about an hour after I sent it with the error message TLS Negotiation failed: generic::failed_precondition: starttls error (0): protocol error
EDIT 2: here are my inbound emai settings in the global properties file
# Inbound #
email.inbound.unknownUser=anonymous
email.inbound.enabled=true
email.server.enabled=true
email.server.hideTLS=false
email.server.enableTLS=true
email.server.requireTLS=false
email.server.port=1025
email.server.domain=alfresco.amritmro.com
imap.server.enabled=true
imap.server.port=1143
imap.server.host=0.0.0.0
i am new to grails ,
i created a new project to check mail plugin.
In the controller i added the following command in index
sendMail {
to "my_mailid#gmail.com"
from "another_valid_id #gmail.com"
subject "link test"
body 'haiiii'
//html g.render(template:"mailtemplate",model:[code:UUID.randomUUID().toString()])
}
render "send"
when i am running the application it shows no error and display send in browser. but when i am checking the my mail inbox mail is not reached.
i didn't done any changes in config file. as it by default works in localhost and in port 25.
thankz in advance
http://grails.org/plugin/mail
By default the plugin assumes an unsecured mail server configured at localhost on port 25. However you can change this via the grails-app/Config.groovy file.
It assumes an unsecured mail server on your localhost on port 25. If there isn't one running there, it won't send mail. I'm not sure what your operating system is, but if you are on a mac or *nix system, postfix comes installed.
sudo postfix start
If you're on Windows you can find an alternative. Honestly, it's easy to simply configure to send from a gmail account which is what I have done for my clients. You can see how to do that at the link above.
I made a process using activiti-explorer and I deployed.I have a startevent,mail task,user task and endevent.When I started the process it says "Warning!Could not send e mail". What should I do?
Thanks
The Activiti engine sends e-mails trough an external mail server with SMTP capabilities. To actually send e-mails, the engine needs to know how to reach the mail server. Following properties can be set in the activiti.cfg.xml configuration file.
More info: http://www.activiti.org/userguide/#bpmnEmailTask
I want to create a mail server, but my ISP does not allow reverse-IP record, so I ordered a VPS with such function. But I want use VPS only as a relaying server and my own server as an actual mail server (so it should have things like web-mail, and some other). I did not find any guides, but looks like VPS will be called a "smart-host". So I installed Axigen on my server, but it requires login and password for connecting to a smart-host. I tried to use postfix for relaying but I did non figure out how to properly configure it. What are my options?
Thank you!
To securely enable postfix as a mail forwarding server, you'll have to enable and configure SASL authentication. The postfix SASL README has all the details. I suggest dovecot as the backend, as it's the simplest to setup. After that, just create a new system user (adduser mail-forwarding) and configure Axigen to use that user for forwarding.
If I understand correctly, your goal is to forward outgoing mail from your local server to the VPS while incoming mail should be stored on the local server. This is possible, but not necessarily simple. Mail needs to be handled differently depending on how it reaches your local server, otherwise you might end up with a mail loop, with your servers playing pingping using mail sent back and forth.