I was able to setup Server & Bots with Xcode 9 (ref). The integration can be run smoothly. However, the expected email report is never sent.
I've already setup my Mac to send emails using postfix. For example, I can run this command and then receive the email:
$ date | mail -s test1 nigong#mydomain.com
To make Xcode send email, I have done the following setups:
However, no email is sent or received. I wonder if there is any additional setup is needed.
Any help is appreciated. Many thanks!
After 20 hours searching I finally found the problem. I will try to describe the needed steps to get this working:
On your CI server the postfix SMTP server needs to be configured and working. There are multiple tutorials on the internet. The one I used was this one:
https://blog.anupamsg.me/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/
However, I still was not able to sent a mail with the mail command after I configured everything like explained in the tutorial.
The missing piece was the Gmail setting for "less secure apps". Gmail does not allow sending emails over their SMTP even if login and password are correct. The SMTP server needs to fulfill special requirements. (which I am not aware of...) However, it is possible to losen that restriction and allow access from any SMTP. Here:
https://support.google.com/accounts/answer/6010255
Set "Allow less secure apps" to On. I recommend creating a dedicated Gmail account just for this and not to enable this setting on your day-to-day email account.
Now everything was working and I was able to successfully send mails with the macOS cli command mail.
The last step needed to solve this was to setup the Xcode server settings correctly. (and this is what basically answers OP's question). So, the correct setup (after mail cli works) was to not set any settings in Xcode server. Just remove all the settings, then Xcode server will fall back to postfix.
Just remove all settings, that's it. Now Xcode CI server sends successfully emails.
Related
Trying to have Jenkins send an email to a Gmail account upon every build. I get:
Failed to send out e-mail
com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError 9sm5733284oij.25 - gsm
Here's what I tried so far:
Made the gmail account accept emails from less secure apps
Generated an application password from gmail and used it in my Jenkins configuration - got the same error with and without the app password
Looked at at least a dozen answers (yeah) and all the screens showing the Jenkins gmail config look the same as mine
telnet smpt.gmail.com 465 responds as connected
My Jenkins install is localhost using this URL: http://192.168.0.1:8080/
My system admin email address exists and is entered in Jenkins
I've tried filling in the section on Extended E-mail notification and removing the entries - no difference
Turned off Windows Defender, thinking, just maybe???
Also tried to configure Outlook/Hotmail using those smpt parms but that gave different errors
Don't know if this matters but I have that 'It appears that your reverse proxy set up is broken' and I don't recall setting up a reverse proxy!
Any help would be greatly appreciated!
Set up Jenkins email notification as shown below:
To resolve this, create & use app passwords with 2-step verification turned on.
A less secure method is to allow less secure apps without 2-step verification.
I am not sure if this is technically possible but I am running a AMPPS box on Windows 7 as my localhost and I have configured it with Gmail SMTP (ssl://smtp.gmail.com) to send out email from my PHP scripts like joomla, wordpress, socialengine, etc.
Now I installed and setup hMailServer and I am able to send and receive emails locally but was wondering if there was a simple way that I could configure my localhost and email server to send out email to outside world (e.g. #hotmail.com or #yahoo.com receipients) using Gmail SMTP?
Currently with my setup, I am only able to receive installation confirmation emails from AMPPS but nothing else like "Forget Password" or "User Registration Forms" work.
Any ideas without getting too deep into code modification?
The simple answer is no, or rather it is far from easy, especially from a home based server.
And the reason is that your IP address amd mail server domain will not be considered as a ligitimate mail server by most of the legitimate mailservers you will be trying to send mail to, and they will just reject it as yet another spam server.
Have a look at these:
https://serverfault.com/questions/72559/setting-up-a-mail-server-best-practices-to-be-recognized-as-legitimate
How to conduct legitimate email campaigns
I have Jenkins version 1.480.3 installed on my machine and Email-Extention Plugin 2.30.2.
Test mail from "Manage Jenkins" section works fine. When I add editable email notification to my jobs, I am not receiving it.
Also tried configuring "Triggers" in editable email notification advanced section. That also didn work. Console logs of build shows email has been triggered.
Can someone help me on how to debug this?
At first you have to create a template http://url-to-jenkins/emailexttemplates/.
In the field "Project Recipient List" you can add some emails (comma separated).
You can also insert global variables (Manage Jenkins > Configure System > Global properties) with:
${ENV, var="PATH"}
The "Advanced Settings..." option provides a trigger management, just add "Recipient List" and now you should get some emails by Jenkins.
It appears that, in some version Extended E-mail Notification become own SMTP Server configuration.
So check your configuration under "Manage Jenkins" -> "Configure System" -> "Extended E-mail Notification" and make sure that fields "SMTP Server" and " Default user E-mail suffix" are filled properly.
Make sure also that the configuration is consistent with "Manage Jenkins" -> "Configure System" -> E-mail Notification.
TL;DR
Fill out fields "SMTP Server" and " Default user E-mail suffix" under "Manage Jenkins" -> "Configure System" -> "Extended E-mail Notification"
Wasted few days.
Also tried to Downgrade the email-ext plugin to 2.25
but this Doesn't help.
Test mail sended, In Console Log was Sending email to: mymail
But stiil have no messages.
I found solution that help me....
I used gmail. So I Verifeid my gmail account via cellphone, than I fill Security Settings and gave Access to my account from unreliable sources.
Then I fill that mail into Use SMTP Authentication in Global Settings.
That worked for me :)
Check if you have SSL enabled under SMTP Auth settings. For me, I was able to see a successful trigger, but email was never sent.
I spent hours trying to resolve this issue, I've implemented everything mentioned here, and didn't work for me, the solution that worked for me was to uninstall the plugin and install it again!
Downgrade the email-ext plugin to 2.25
This is a long shot. But chrome was auto filling my SMTP Authentication password, so when I changed any setting and clicked save, the password would also be overwritten.
Hopefully I can save someone else a headache!
Short Description of problem that I was facing:
When I was sending test mail from Manage Jenkins -> Configure System
-> E-mail Notification, I was able to successfully send and receive emails but there is no such option to test email in Extended E-mail
Notification tab
While running a job, when I was sending email in post-build step via E-mail plugin, I was able to successfully send and receive emails but with same settings, I was getting following error on sending mail via Extended E-mail:
MessagingException message: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials
I went almost crazy searching for resolution of this issue.
I tried every resolution mentioned on this page but no success. I even tried downgrading the plugin to 2.25 but I was still getting error when sending email via Extended E-mail plugin. Everywhere on internet also the only solution mentioned to solve this problem was to "Allow less secure apps" and to check if credentials are valid, which in my case were valid since I was able to successfully send mail via normal email plugin.
After struggling for a few days, I finally found the silly thing that was causing this issue.
I had to type-in email ids into each and every box in:
Manage Jenkins -> Configure System -> Extended E-mail Notification.
Copy-pasting email ids or domain names is causing this annoying and time taking issue. So, in case if you fall in such a situation, please make sure you have handwritten email ids in each column and not copy pasted.
Following configurations for "Extended E-mail Notification" worked for me:
Email Extension Plugin : 2.69
SMTP server : smtp.gmail.com
Default user E-mail suffix: <left this blank>
Enabled Use SMTP Authentication
User Name: <email id of account through which email is to be sent>
Password: <Password of account through which email is to be sent>
Advanced Email Properties : <left this blank>
Use SSL : Enabled
SMTP port: 465
Charset: UTF-8
Also, I had enabled less secure apps.
Hope this saves someone's time!!
Sometime after 2.66, if the From field is not set in the project, it doesn't seem to be falling back to the system email address. I believe this ticket is tracking the issue. https://issues.jenkins-ci.org/browse/JENKINS-63522
i performed the following action (after hours and hours of investigation)
and at the end it worked for me.
Unistalled the Extended mail plug in.
Deleted from .jenksins the plugIn (it remains also after Unistall).
Reinstalled the Extended mail plug In and enabled it.
Restart Jenkins.
In the Jenkins Configure System, in the Extended E-mail Notification section,
I set a new credential access to my gmail account
(also the previous credential stored were correct but i preferred to generate a
new one with a different description).
And then... Finally afteer several time on this matter it works for me!.
Try to use Extended E-mail Notification > Enable Debug Mode (selected). It will show you more logs in the Job Run Console section.
In my case, it showed me in the logs that credentials copied from regular email-ext (AK_AWS_SES_CREDENTIALS/****** (Migrated from email-ext username/password)) were not able to connect to AWS SES SMTP service.
I have Jenkins version 1.480.3 installed on my machine and Email-Extension Plugin 2.28.
I have configured my jobs on Jenkins and everything works fine except the final build success email.
I have configured four triggers for Email-Extension plugin:
Failure
Success
Unstable
Before Build
For all the triggers I have enabled "Attach Log" and all works fine except the "Success".
I get the following message on screen:
Email was triggered for: Success
Sending email for trigger: Success
Request made to compress build log
Sending email to: abc#example.com def#example.com
Error sending to the following VALID addresses: abc#example.com def#example.com
Notifying upstream projects of job completion
Capturing build context information.
Finished: SUCCESS
Please could someone help me since I really have no clue how to resolve this.
I had this problem too. In the end, it was because my attached build log was too large! The SMTP server refused to send out the e-mail causing the error message:
Error sending to the following VALID addresses: ...
Disabling the option to attach the build log or fixing the output of my build to not dump so much text fixed the problem:
Looks like a bug in the plugin. Here's a workaround:
In the global settings for the plugin make sure to provide a full e-mail address for System Admin E-mail Address, (e.g. foo#bar.com, not just foo), even though you've specified the Default user E-mail suffix. The address itself can be bogus, though.
For Email, you have to install following plugins.
Email-ext plugin
Email-ext Template Plugin
To provide the configuration, go to the Jenkins System configuration page (Jenkins > Manage Jenkins > Configure System > ” E-mail Notification ” section). You will be able to see the below screen to add email configurations:
SMTP server name : smtp.gmail.com
User name : user_email_id#gmail.com
Password : user_email password
Use SSL : Checked
SMTP Port : 465
Now, configure “Extended E-mail Notification” section. You will be able to see the below screen. Fill the same value as above parameter.
Now, Click on Default triggers at bottom right corner and select success. Apply and save you configuration.
Now Goto your job and Click the Add post-build action drop-down, select E-mail notification option.
Enter the recipient email id in the ‘E-mail Notification’ box and select the checkbox next to the ‘Send e-mail for every unstable build’ option.
Click the ‘Add post-build action’ drop-down and select the ‘Editable Email Notification’ option.
In Project Recipient List , This is a comma separated list (optional whitespace after commas) of email addresses that should receive emails. May contain references to build parameters. To CC or BCC someone instead of putting them in the To list, add cc: or bcc: before the email address (e.g., cc:someone#example.com, bcc:bob#example.com).
In Attachments field, you have to give the path of your binary file (i.e path of your .ipa file like, build/artifacts/IPA-Name.ipa)
Now click on Advanced Settings at bottom right corner. Click on Add trigger and select Success trigger. Click on Add drop down from the success trigger and select Recipient List option. Apply and Save your configuration.
n mac-mini for iOS job configuration, if email is not send and gives you java exception error message then you must turn on less secure apps.
I also had this problem, and it was because I forgot to set the SMTP server (in the plugin section of configuration), but only saw the default SMTP server settings.
My first guess is that the global jenkins email configurations are not set correctly.
Manage Jenkins -> Configure System -> E-mail Notification
This is the default plugin, not the extended one you installed manually. The SMTP server field defaults to localhost, so unless you have an email server setup and running on the same box, this needs to be set.
If that is set then I would try telnet'ing to your email server from your Jenkins server to make sure there is not a connection error.
After days of search for answer, it turns out the gmail has attachment limit for 25 mb, and my output is larger than that.
Check your output size if you met this issue and you are using gmail for mail server.
Refer all above solutions, if it doesn't work. You can try this solution.
Zip file is blocked in Gmail. You should rename your zip file inside script before send it. (Example: file.zip.abcxyz). I solved my problem.
I had the same problem. It turns out that for some reason, Jenkins would not save my "Extended E-mail Notification" SMTP settings. At one point, it did save the setting and the emails started working. Make sure that the bit in red is selected and double-check it after you press Save:
If every thing fails, try restarting jenkins process. That solved for me. Somehow the Jenkins system was unable to load all of the configs without a restart? But give it a try.
Today i faced this issue on a jenkins machine that was sending emails just fine till a couple of weeks ago. I turned it on today and it just wont send emails because of "Error sending to the following VALID addresses"
I tried these steps:
Made sure I am not attaching any log file in the email.
Made sure "System Admin" email has the domain name mentioned.
Jenkins was able to successfully send emails to me when i tried it by "Test configuration by sending test e-mail"
Downgraded my email ext plugin.
None of the above mentioned steps helped.
Finally i replaced my company's SMTP server with the jenkins default server and it worked just fine. Not sure why this has happened, I need to talk to my IT guys and see if they have enabled any new security in SMTP server.
Hope this helps to people who hit this same issue.
Thanks
I have application that needs to send emails and sms text messages. It sends emails just fine, but when I try to send text messages using email gateways (for verizon, xxxyyyzzzz#vtext.com) I get nothing. I have texted the phone using though the email gateway using my gmail account, so I know it works. I would just think that from my app's point of view I am just sending out another email. Any idea why this doesn't work? Or what I can do to troubleshoot it?
I should also note that I am doing this from a Rails app on my local computer...not that it should matter.
Maybe Verizon has software that can identify emails sent from software rather than humans, and rejects yours?
Try making your software add all the same headers (eg. X-Mailer) that a normal email client would add.
Verizon could be doing a reverse DNS query as a simple spam check. Your ISP's info could show up during this look up instead of the return address info that your email message contains, and thus could be getting blocked.
To troubleshot this make sure that the return e-mail address that you are using is coming from an ISP e-mail account.
Here is how to debug it on Linux. Run your Rails application server with strace:
strace -s99999 -e connect,read,write,close -o strace.log script/server
Then examine strace.log and see exactly which SMTP server the Rails application connects to, and what it reads and writes.
Then do the same with your favorite mail client (recommended: mutt, because Thunderbird is slow in strace).
Try to send exactly the same bytes from Rails what your mail client sends.
I have used SMS_Fu in the past to send out text messages. It has worked wonderfully.
I have written a client app for Ruby for sending SMS, please see http://freebiesms.blogspot.com/2009/07/send-free-sms-from-ruby.html to download
complete source code.
Regards
Dan