EWS: Validation of the credentials of the service - exchangewebservices

Is there anyway to check or validate the username and password assigned to an exchange service before getting a url ?
In my program now , I create a new service and assigned username and password to it as follows
var service = new ExchangeService(exchangeVersion) { Credentials = new WebCredentials(userSmtp, password) };
service.AutodiscoverUrl(userSmtp, RedirectionUrlValidationCallback);
If there is something wrong with the credentials (e.g. wrong password), the exception will be
"Autodiscover service couldn't be located".
The problem with this method that it does not really specify the reason for not being able to bring the url. So is there any way that I can know why exactly I am unable to locate the the service? for example I would like to see an exception message saying that wrong username or password.
Can anyone help me with that ?

Have a look at the Microsoft Remote Connectivity Analyzer # https://www.testexchangeconnectivity.com/
You can test:
-Microsoft Exchange ActiveSync Connectivity Tests
-Microsoft Exchange Web Services Connectivity Tests
-Microsoft Office Outlook Connectivity Tests
-Internet Email Tests

Related

Google SMTP returns required authentication but it's done as an app password

I am setting up SMTP service on Airflow 2.1.2.
I get this error which is quite obvious:
smtplib.SMTPSenderRefused: (530, b'5.7.0 Authentication Required. Learn more at\n5.7.0 https://support.google.com/mail/?p=WantAuthError w5sm3433302wra.87 - gsmtp'
But authentication is done, i am using an email that has 2 steps authentication, so I created an app password and I recognized the activity in google account security tab..
My setup is:
AIRFLOW__EMAIL__EMAIL_BACKEND airflow.utils.email.send_email_smtp
AIRFLOW__SMTP__SMTP_HOST smtp.gmail.com
AIRFLOW__SMTP__SMTP_MAIL_FROM my email
AIRFLOW__SMTP__SMTP_PASSWORD my app pwd of 16 chars
AIRFLOW__SMTP__SMTP_PORT 587
AIRFLOW__SMTP__SMTP_SSL False
AIRFLOW__SMTP__SMTP_STARTTLS True
AIRFLOW__SMTP__SMTP_USER my email
I checked and there is no extra space or something like that neither in pwd or email.
Why is it returning required authentication when authentication is really done?
Not sure why it is not working. But do you see:
Fetching SMTP credentials from configuration variables will be deprecated in a future warning? You should if your environment variables will be used.
If you do not see it, then you likely have smtp_default connection in the Connection database.
In Airflow 2 the authentication for SMTP has been brought to the same level as other connections and rather than passing user/password via environment variable, they should be configured as login/password in the 'smtp_default' connection.
The variables should still work as fallback, but if you already have smtp_default connection created and has some login/password (even empty) configured, those will be used instead of the ENV vars.
In your case likely the solution will be to set login/password in the connection.

OJS 3.0.1 is not sending any emails

I have a new installation of OJS 3.0.1. I am new to OJS so I apologize if my question is simple. I log in as the manager and create a journal. I tell it to send email to my address but I never receive it. . When I try to send from OJS there is nothing in the maillog . in OJS in the classes/mail folder there are only 1 php files. Is that correct.
Also, is there an easier way to test sending mail from OJS
Please see the documentation:
3) Emails sent out by the system are never received.
A: By default, OJS sends mail through PHP's built-in mail() facility.
On Windows PHP needs to be configured to send email through a SMTP
server (running either on the same machine or on another machine).
On other platforms such as Linux and Mac OS X, PHP will sent mail using the local sendmail client, so a local MTA such as
Sendmail or Postfix must be running and configured to allow
outgoing mail.
See http://www.php.net/mail for more details on configuring PHP's mail functionality.
OJS can also be configured to use an SMTP server as specified in config.inc.php, either with or without authentication.
There are many ways to configure email for OJS. There are advantages and disadvantages all around. Using Gmail for SMTP is simple to set up, but it does not give you the ability to direct emails to individual associate editors. If you want fine grained control, you need to run your own mail server, and that takes some setting up. Also, with your own mail server, spam filtering becomes a problem. For our installation, we had to send email from OJS to our own email server (same domain) and then forward to external addresses. If we sent directly from OJS to external addresses, spam filters would block the email b/c OJS wants to impersonate your email address while sending it from another domain (you solve this by creating an email address in the same domain as OJS so the email headers aren't spoofed this way).
You can see specific examples of email set ups here. Reviewing these might answer your question or help you ask a more specific one.
There are 2 easy ways to setup Open Journal System (OJS) email
config.inc.php
PHPMailer.php
config.inc.php
Open config.inc.php (public_html/config.inc.php), uncomment and configure the following lines
smtp = On
smtp_server = mail.domain.com
smtp_port = 465
smtp_auth = ssl
smtp_username = info#domain.com (your email)
smtp_password = *********** (your password)
you can confirm smtp_server and smtp_port through cpanel
enter image description here
PHPMailer.php
Open PHPMailer.php (public_html/lib/pkp/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php) and configure the following
public $From = 'info#domain.com';
public $FromName = 'User';
public $Host = 'ssl://smtp.domain.com';
public $Port = 465;
public $Username = 'info#domain.com';
public $Password = '**************';
public $AuthType = 'ssl';
In New Version of OJS-3.2.0-1 has no setting of SMTP and PHPMailer Setting. Many people worried about email notification when I debug the issue I found that no SMTP Setting & PHPMailer.
First of all, User should check localhost Connecting with XAMPP Server. If the server has successfully sent a mail message it means localhost is working. Now you should check simple code of PHPMailer to check the Connectivity with XAMPP while PHPMailer is working

Configure send Mail Task

Can some one explain me how to configure the send mail task is ssis 2012?
I don't where we need to assign our Mail password while configuring.
You specify the password when you set up the SMTP Connection Manager.
The MSDN page on SMTP Connection Manager has all the details.
https://msdn.microsoft.com/en-us/library/ms137684(v=sql.110).aspx
AFAIK, The out of the box Send Mail Task in SSIS only supports an SMTP Connection Manager.
Right click in the Connection Managers area and choose SMTP as the Type.
You will now be prompted to Enter the SMTP Mail Server connection details. The minimum required are the SMTP Server's address. The rest default to their default values. Ex: If you don't enter timeout, it defaults to 60000 = 60 seconds.
Once you enter the details and press OK, the ConnectionString property of the SMTP Connection Manager will be set (see example below)
It is a good idea / best practice to parameterize this ConnectionString property so you don't have to change code if the SMTP server info or connection details change at a later date.
I keep the SMTPConnectionString at the Project Level (not Package Level) so that it can be re-used across various packages that send emails.
If you need advanced control over this component, there is a 3rd party SSIS component provider that has something called Send Mail Task Plus. That lets you configure an email provider password and such, although I rarely see this need in the enterprise SSIS world.

Setup SMTP server to use it in Send mail task from SSIS?

I want to send the email using Send mail task, I have already tried using script task and it was successful
Do not answer like use script task etc. I have already used it and it worked for Gmail.
I am learning send mail task and I have created SMTP connection manager , I don't know how can i setup the SMTP server using windows authentication so that the server name I can give in the SMTP connection Manager.
I an expecting answer to the question "How can i setup the SMTP server which if any public email allows setting up SMTP server using windows authentication on my local box so that I can use it in Send mail task ?"
Any help in this regard is appreciated...
Also do not answer like your company will provide that , I myself want to setup it and use it .
You have to setup a new smtp connection first: see this link for more info: ssis mail

Pingfederate SCIM Inbound provisioning

I have configured SCIM inbound provisioning in pingfederate 7.2.0 using Active Directory as an user store. But when I hit the URL exposed by ping to search for an user I get the following error on the browser-
{ "totalResults":0,"itemsPerPage":0,"startIndex":0,
"errors":[{"description":"User and/or certificate not found","code":"401"}]
}
In the logs it says
11:34:29,251 DEBUG [Authenticator] AuthnInfo: ID='null' cert:false
basic:false from CERT:'null' BASIC:'null' 11:34:29,251 ERROR [UsersIdResource]
Unable to find a connection associated with the username/password and/or
certificate passed in with the request.
11:34:29,252 DEBUG [TrackingIdSupport] [cross-reference-message]
entityid:null subject:ranajoy
Can someone please help me with this?
I was having this exact same issue. I set up my Provisioning connection correctly, and it worked in other environments, and everything looked good. But then I got this error. If I changed the Basic Auth to a bad password, the error message at least changed to "Bad Password for <user>".
I took another look at my connection and realized I never actually activated the connection: