Error sending to the following VALID addresses Jenkins - jenkins

I will receive emails when I trigger using build now manually, but I don't receive emails when I tried to using it in batch mode. Below is the log I obtain when triggered in batch mode.
Email was triggered for: Always
Sending email for trigger: Always
Sending email to: abc#example.com
Error sending to the following VALID addresses: abc#example.com
Note: There are no build logs attached while sending email.

You should set SMTP Server and Authentication in both E-mail Notification and Extended E-mail Notification sections.
Click Advanced button to see this Use SMTP Authentication section.

Error - Not sent to the following valid addresses: <valid_recipient_address> OR Error sending to the following VALID addresses: <valid_recipient_address>
Reason - Email address of sender is not correct.
How to troubleshoot - Enable the debug mode from Jenkins -> Manage Jenkins -> Configure System -> (Search for Extended E-mail Notification configuration -> Check Enable Debug Mode
Example of Working code
emailext attachLog: false,
attachmentsPattern: 'example_file.yaml',
from: '<valid_sender_address>',
body: 'Test Message',
subject: 'Test Subject',
to: '<valid_recipient_address>'

In your Jenkins configuration, make sure that you have entered correct email address for "System Admin e-mail address".
Notification e-mails from Jenkins will be sent with this address in the "from" header.

For me, file size was 5-7MB, I looked at my internet speed meters, saw it, using the full upload speed for around 1 minute, but couldn't complete and gave that error message.
Then I tried smaller file, like 10KB, it worked like charm.
So, for my case, my guess is, somehow file is not getting properly uploaded to email server.

If every thing fails, try restarting jenkins process. That solved for me. Somehow the Jenkins system was unable to load all of the configs? But give it a try.

Related

Email-Ext Jenkins Plugin

Using this plugin to send email notifications after all builds complete. Even if I set the trigger to "Always" under the advanced options of the Editable Email Notification plugin, the email is not always sent. It's sent on all failures and the first success after those failures. But not on all build executions. Thoughts on what I may be doing wrong here?
Add all email address in “Project Recipient List“
Click on “Advance Settings”, Go to "Trigger" and Check “Send To” option for “Always”, If it's not “Recipient List”, then Add “Recipient List” and save your job.

Mandrill api log says message is sent, but I don't receive it, and it doesn't show in activity

Using a production key on Mandrill I am attempting to send an email. Previously this has worked without issue. However now, despite receiving a successful response from the API, visible in the api log, no email is being sent, and nothing is present in the outbound activity log.
If I check the api log for the message which appeared to fail it displays:
[
{
"email": [email_address],
"status": "sent",
"_id": [id],
"reject_reason": null
}
]
Replacing the id in the content view of a sent email, with the id from a failed one displays a correctly formatted email:
e.g. https://mandrillapp.com/activity/content?id=20151214_[put_the_id_here]
Is this a bug? What is causing it? Where can I see more information about what happened? How can I monitor if this happens again in the future? How can I prevent it from happening in the future?
I have been in contact with Mandrill support regarding the issue, which they described as 'very strange indeed'. Deleting the API key and generating a new one fixed the issue, but there is no explanation as to why this is they case, how to detect the problem, or how to stop it from happening again in the future.
The messages in question were never actually sent by Mandrill, and displayed no SMTP events, despite reporting as sent by their API
Something else to check is to make sure you're using a working API key instead of a test one. As the name suggests, test keys are designed to work just like a regular key, so the feedback to your program will be identical, but the messages won't actually be sent.
You can see if this is the problem by going to the Mandrill settings and looking at the list of API keys. Test keys have a very clear This is a test key message listed.
This probably won't be an issue if you generated the key yourself, but if you inherited this project it's worth taking a look.
I have faced a similar issue like this last week. The "sent" status only indicates that Mandrill sent it. But reception of the email message is confirmed only if there is a SMTP event corresponding to it with code starting with 2, (example 250 etc), in the info api response, like the following:
"smtp_events": [
{
"ts": 1442448422,
"type": "sent",
"diag": "250 SmtpThread-4622542-14682902148#ps-they-19.uk.miplecast.lan Received OK",
"source_ip": "505.207.171.171",
"destination_ip": "705.139.255.221",
"size": 29501
}
check this link for more info.
https://mandrill.zendesk.com/hc/en-us/articles/205582697-How-to-Confirm-If-an-Email-Was-Actually-Delivered
the issue could be on the recipient server as well, due which delivery could be delayed. In our experience last week, the message was delivered 4 hours after being Sent. we were not able to establish the reason yet why, this delay happened.
HTH,

How to debug the rails mailer

I am using mandril mailer, I have set up my mailers and everything was working fine, at some point the mailer stopped working, I am trying to send a message from the rails console
TaskCompletedMailer.client_created(email: 'mymail#gmail.com').deliver
I am getting a message in the console that the email has been delivered.
[{"email"=>"mymail#gmail.com", "status"=>"sent", "_id"=>"184e03d40a874fa892b5549173ccba80", "reject_reason"=>nil}]
but the mail is not been delivered into my account.
How can I debug that ?
Check in the logs what can you see there. Probalby the action_mailer config is not correct for your current enviroment.
You can try to use a protocol analyzer, such as Wireshark, to monitor the SMTP traffic on your network card and so check how realy the rails app sends to it.

Sending mail without leaving app

I want to send a simple mail from my app without leaving it and I already have the code from other questions in this forum, but my problem is that when I send an email from my app, I have to open the mail program from apple so the mail is being sent.
I get a MFMailComposeResultSent when I send the mail from my app but it stays in the memory or somewhere else until I open the apple-mail-app.
I noticed when searching for my mistake that I never let the user enter his email address and password but they're both saved in the apple-mail-program, that's what I think why I need to open the standard-app.
Any suggestions on how to solve my problem? Any help is appreciated.
You did nothing wrong if you are getting a MFMailComposeResultSent. This is not about any username or password of the email account. The documentation says about MFMailComposeResultSent: Send may only be interpreted as a successful queueing of the message for later sending. The actual send will occur when the device is able to send.
Also your problem became a possible duplicate of: ios4.3.4: MFMailComposer doesn't send an email, but return MFMailComposeResultSent status

how to add developers list in pom.xml file.whenever the build fails it will send notifications

presently i am using jenkins for continous integration i configured poll scm for 45 minutes.whenever the build fails it is sending failure notification to developers. Now i want in pom.xml to configure developers list. from here the jenkins should read and send failure notification who commit the code that person only should get failure notification.
What you need is a plugin called "email-ext"
https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin
Once installed, in the post-build actions, checkmark "Editable Email Notification"
Then, you have a choice of "triggers", for example "Fixed" or "Failure" or "Success", and checkmarks that let you select whom to send the email to for every trigger.
You have the option of sending to:
Recipient list - predefined list, either global or per trigger
Committers - those that made SVN changes for this checkout
Culprits - those that made SVN changes since last successful build
Requester - user that triggers the build
In your particular case, you would want a "Failure" trigger, and send email only to "Committers" and possibly "Culprits", and don't checkmark Recipient list.

Resources