Amazon Simple Email Service - "From" email verification - email

I am signed up for AWS SES (with instance, S3 and my website running nicely). I also have rec'd approval for sending out email without receiver verification and "mass production" OK. The only thing I'm left with is having my 3 "from" email addresses verified. Started to download Perl, as was suggested to run email-verification scripts -- but got no where with the installation. Do have my credentials ready to use.
There is an AWS SES API to use for verification which I can't find... suspect that it has something to do with AWS's sdk which I could figure out how to install.
So my question: is there a simple, straight forward way to get my email addresses to Amazon for verification via a response email they send? Their documentation is somewhat confusing.

You have to go validate your email address through their web service (like the perl script is doing). You can also use their SDK's that they publish, which are wrappers around their web service. For example, if you have Visual Studio, you can use the AWS SDK for .NET (also available as a Nuget package: PM> Install-Package AWSSDKForNET) and set up a simple console application to do something like this:
using Amazon.SimpleEmail;
using Amazon.SimpleEmail.Model;
static class Program {
static void Main() {
var client = new AmazonSimpleEmailServiceClient("yourAccessKey", "yourSecretKey");
var request = new VerifyEmailAddressRequest { EmailAddress = "yourEmailAddress" };
client.VerifyEmailAddress(request);
}
}
They also have SDK's available in PHP and Java that work pretty much the same.

This is an old post but came up in a search.
You can now verify emails directly from the SES control panel (See screen shot)
AWS SES Panel

Related

InternalServiceFault when trying to connect SPGo to SP Online in VS Code

I'm trying to connect the SPGo plugin in Visual Studio Code to a Sharepoint Online site. There are lots of guides for this, for instance this one: https://medium.com/niftit-sharepoint-blog/saying-goodbye-to-sharepoint-designer-ac939a0b79ba
In short, I'm doing it like this:
Open VS Code
Open a local, empty folder)
SPGO: Configure workspace (follow guide, ending up with spgo.json
looking like the one I pasted)
SPGO: Populate local workspace (asking me for credentials and I plot
it in O365 style (email and password).
Statusbar says "Populating workspace"
After about 10 seconds I get the pasted error in the output window (spgo)
I'm using newest versions:
Visual Studio Code 1.37.1
SPGo 1.4.3
I have tried various sites in my tenant and I know they are up. I am Site Collection Administrator for the sites. I know the credentials are correct, of course. the remoteFolders and publishingScope doesn't affect anything, when changed. I assume authenticationType should be "Digest".
SPGo.json:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://domain.sharepoint.com/sites/SiteName",
"publishingScope": "Major",
"authenticationType": "Digest",
"remoteFolders": [
"/SitePages/"
]
}
I don't get any files in the local folder, instead I get an error in the output:
================================ ERROR ================================
<s:Fault>
<s:Code>
<s:Value>s:Receiver</s:Value>
<s:Subcode>
<s:Value xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</s:Value>
</s:Subcode>
</s:Code>
<s:Reason>
<s:Text xml:lang="en-US">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.</s:Text>
</s:Reason>
</s:Fault>
Error Detail:
----------------------
{}
===============================================================================
Sorry I missed this post for so long. First- thanks for the detailed write-up. This is the first time I've seen this specific issue with SPGo, so I do not know for sure what is the root cause.
Couple questions:
Are you using ADFS Authentication with your Office 365/SharePoint Online instance?
Are you able to use Addin-Only Authentication on this SP Site?
SPGo should be able to automatically work with ADFS in SharePoint Online but, as a fall-back, you could use Addin-Only Authentication. In this scenario you would create a ClientId and ClientSecret pair for the SharePoint Site Collection you are accessing and authenticate using those credentials. The ClientId would act as your UserName, and the ClientSecret would be your password.
Under the covers, I am using the node-sp-auth package for user authentication. Sergei (s-KaiNet on Github) has a great write-up on how to enable Addin-Only Authentication in SharePoint Online on his site, which you can find here.
Thanks for using SPGo!

Jenkins email plugin doesn't send email to user who broke the build

I've setup Jenkins to send emails only to users who broke the build using email-ext plugin, but I'm getting this error:
Not sending mail to unregistered user user#example.com because your SCM claimed this was associated with a user ID ‘John Smith' which your security realm does not recognize; you may need changes in your SCM plugin
I don't really understand what this error means, is the problem in our SCM, or in the email plugin? The emails are taken from the commit history, should I register them somewhere so Jenkins will start working?
For reference, this is the code around the error message in the plugin's source code:
} catch (UsernameNotFoundException x) {
if (SEND_TO_UNKNOWN_USERS) {
listener.getLogger().printf("Warning: %s is not a recognized user, but sending mail anyway%n", userAddress);
} else {
listener.getLogger().printf("Not sending mail to unregistered user %s because your SCM"
........
How do I enable SEND_TO_UNKNOWN_USERS?
The error message is also mentioned in this bug report.
For version V2.61 or above this can be configured via a radio button.
Go to
Manage Jenkins -> Configure System -> Extended E-mail Notification
and tick the radio button for Allow sending to unregistered users
Edit: If this does not work, see https://stackoverflow.com/a/45353810/492336 for another solution.
OK, after some experiments this is what I found out:
Jenkins takes the email part of the committer (not the author). For example for a commit message that looks like that:
Author: John Smith <author1#example1.com> 2017-07-27 17:15:39
Committer: John Doe <committer1#example2.com> 2017-07-27 17:15:39
Parent: 9c3ff18dda8ca6f7b7ac4ebab4c76d3c85891a33 (commit)
Branch: master
Jenkins will take "committer1", and create a brand new user under People with User ID "committer1" and email "". Unless that user has a password however, it will be considered unregistered so you need to go to Configure for that user and add a password field to it:
So this is one way to fix the error, but you have to do it for every user and in a big team it can be tedious.
Put the line bellow in your jenkins startup script
-Dhudson.tasks.MailSender.SEND_TO_UNKNOWN_USERS=true
The newest Jenkins security directive only allow sending mail to registered user. The line above bypass this configuration.
Given jenkins takes the first part of the email address and creates a user, I made my team have their jenkins user name be the first part of their email address. This removed any overhead of having to maintain two separate users.

Sitecore custom MTA for localhost

I am trying to figure out EXM for Sitecore. I installed it and now I am trying to configure it to send emails from my local machine. SAC MTA is not an option because I don't have access to App Center. I am left with custom MTA.
I was trying to configure config files to use gmail smtp:
Sitecore.EDS.Providers.CustomSmtp.config
<smtpSettings type="Sitecore.EDS.Core.Net.Smtp.SmtpSettings, Sitecore.EDS.Core" singleInstance="true">
<server>smtp.gmail.com</server>
<port>465</port>
<userName>*****#gmail.com</userName>
<password>*****</password>
<authenticationMethod>Login</authenticationMethod>
<startTls>true</startTls>
<proxySettings ref="exm/eds/proxySettings" />
</smtpSettings>
Sitecore.EDS.Providers.CustomSmtp.Sync.config
<pop3Settings>
<pop3Setting type="Sitecore.EDS.Core.Net.Pop3.Pop3Settings, Sitecore.EDS.Core" singleInstance="true">
<server>pop.gmail.com</server>
<port>995</port>
<userName>****#gmail.com</userName>
<password>****</password>
<useSsl>true</useSsl>
<startTls>true</startTls>
<proxySettings ref="exm/eds/proxySettings"/>
</pop3Setting>
</pop3Settings>
But when I try to "send quick test" through EXM I get "Failed to connect to the email server. Please try again later". Can anyone help me with that configuration. And is it even possible? I remember reading something about paid license to use custom MTA. Would it mean, that you need to pay to send email via EXM?
To switch from using the Sitecore MTA to using the Custom SMTP, you must disable the Dyn configurations and then enable the CustomSmtp configurations:
In the Website\App_Config\Include\EmailExperience folder, add the suffix .disabled to the end of the following file names:
Sitecore.EDS.Providers.Dyn.config
Sitecore.EDS.Providers.Dyn.Sync.config
In the  Website\App_Config\Include\EmailExperience folder, remove the suffix .disabled from the following file names:
Sitecore.EDS.Providers.CustomSmtp.config.disabled
Sitecore.EDS.Providers.CustomSmtp.Sync.config.disabled

How to send an email with Ansible

I'm trying to send an email using Ansible, but I can't understand how it works as I don't know how to provide user and password for such service (not specified in the documentation).
Both my machine and the email server are in the same network, but I need to be authenticated in order to send the email.
This is my yml file:
---
- name: Testing email
hosts: localhost
tasks:
- name: Send email
local_action: mail
host=mail.server.com
port=993
subject="Ansible test mail"
body="Testing email"
from=my#email
to="y#email
charset=utf8
And this is the related content of the hosts' file:
[localhost]
localhost ansible_connection=local
Any idea about how should I configure it? Thanks in advance.
Looking at the source code for the mail module ( https://github.com/ansible/ansible/blob/d1effecb2ef073e478c67a7ca39cf56708a66a48/library/notification/mail ) it doesn't look like it supports SMTP authentication.
It shouldn't be too hard to add support for it however. It would require adding the username and password parameters to the module, detecting if they've both been supplied, and if so, calling smtp.login() with those parameters.
In fact, it looks like there's two pull requests to do exactly that at the moment here
https://github.com/ansible/ansible/pull/7213
and here
https://github.com/ansible/ansible/pull/6667
So support will most likely be added in dev soon.

How to create HelloWorld Zend Soap Server & Client over SSL using Self Signed Certificate

I am trying to create a basic SOAP Server over SSL. Before making Web Services available on my Production website, I have to test it on Development system with has got Self Signed Certificate (Whose authentication is a problem right now). Following are the problems I am facing in that regard:
When I try to call https://zendsoap.lan/Zend_Soap_server.php?wsdl
its works fine I can view the wsdl.
But when I try https://zendsoap.lan/Zend_Soap_server.php, I get
this:
SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://zendsoap.lan/Zend_Soap_Server.php?wsdl' : failed to load
external entity "https://zendsoap.lan/Zend_Soap_Server.php?wsdl"
Is that something I should be getting or Some nice looking HTML page
describing the usage of webservice like in NuSoap.
I tried verify_peer=>false as I am running it on dev server so no need to verify my own created certificate, but obviously on production I want the Certificate to be verified.
This thing work fine with NuSoap but most of the stuff in NuSoap is deprecated for our server which is running PHP 5.4.6, So the most reliable solution for me using PHP's SOAP extension. And the reason for me using Zend is we're in process of moving our system from some third party framework to Zend Framework and everyday I get requests from client to add this & that new components, I assumed if I develop every new request from Client using Zend libraries then it will be easy for me in later stages to move to Zend Framework.
openssl is enable and tried with defining local_cert as well, but no Joy.
I hope I made some sense there.
Basically looking for some instruction how to create Self Signed Certificates for this purpose, what should be the code for Server & Client.