I am trying to send an Email to alert users of a file being imported.
In the PHP script, I have added "$mail->SMTPAuth=False", but I get the following error when trying to run the script: "SMTP ERROR: MAIL FROM command failed: 553 authentication is required"
If I run this script on a different machine, the SMTP error from above will not appear. I have tried and copied settings from the working machine, but on my own machine it still gives 553 error. I have ask the Email Server Admin regarding any special permission given to the working machine, but there was none. Are there any other settings I need to check?
Currently, I have matched all environmental variables and php's folder content from the working machine.
Credit to #Synchro
Turning off auth in your script will not work if the server requires it, and that's where the error is coming from. It could be requiring auth if you're not on its local network, which would explain the discrepancy between the two locations.
As I run script on localhost works fine. but on server showing 403 error:
in my google console
for redirect url - xyz.com/change/googlelogin
in my browser - after login with google auth it show me like -
xyz.com/change/googlelogin?code=4/sgAnQ7T_O5l7bDPgaMQ4_s-c0Abz_wxsVPIt5bPQdaklIdF0QyoQicTXyW7CUQHh5ScUBZ4GYyyV8cZyiX-mu3s&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.profile%20https://www.googleapis.com/auth/userinfo.email with above error
This is because of modesecurity restrictions from your hosting provider. Request them to disable for your domain. I was facing same issue ,i contacted support center and they fixed issue. Now it is working fine.
Reference Link
Whenever a new user tries to create a new account, they get this message
Tried to send you an email but failed!
I tried setting up an email and using the smtp settings in Site
Administration -> Message output -> Email and that did not work.
I called my Host company (inmotion hosting) and they verified that my
settings were correct.
I tried just leaving the settings blank in email so that the phpmailer would send the emails, but that is not working and I still get the same message.
I have searched all overand I cannot find any helpful information on why this is happening,
but I find A LOT of people who are having this issue.
This has turned into a MAJOR show stopper and I am wondering what avenues I have to troubleshoot this. Does anyone have any information on how this is fixed?
Thanks in advance.
It might be missing a "from" email - have you got a support email set up?
/admin/settings.php?section=supportcontact
Or go to Site Administration > Server -> Support contact
I've had a similar issue. It works fine for the first three users created (in quick succession) but then fails for a few minutes. Enabling debugging (Site Admin -> Development -> Debugging page) showed that this was due to timeouts:
Debug info:
Error code: auth_emailnoemail
Stack trace:
line 463 of /lib/setuplib.php: moodle_exception thrown
line 106 of /auth/email/auth.php: call to print_error()
line 70 of /login/signup.php: call to auth_plugin_email->user_signup()
Output buffer: profile_field_PC<pre> SMTP -> ERROR: Failed to connect to server: Connection timed out (110)SMTP connect() failed. </pre>
This appears to be an anti-spam "feature" of the Amazon SES service we were using, which we will need to get around.
I know this is an old post but I will add my solution and give many thanks to Russell for that part of it.
This site had been moved over to Bluehost and come to discover that client did not set up an email account for Admin User - so in addition to checking that there is an email in the Admin settings, also verify that that email address exists and is reachable!
I am trying create users on openfire using a url link but for some reason I'm getting an error.
I've installed the plugins and opened the right port, but I'm getting
RequestNotAuthorised errors.
This is the link I am referring to:
http://www.nkstream.com:9090/plugins/userService/userservice?type=add&secret=bigsecret&username=kafka&password=drowssap&name=franz&email=franz#kafka.com
Go into the Server > Server Settings > User Service and enable the user service. You will also find the secret key there. You will need to replace the "bigscret" in the URL with the secret key found in the area I just specified.
You can use "User Service" plugin: you can find it in the section plugin on your Openfire server.
Once installed:
Server -> Server Settings -> User Service
enable 'user service request' and note 'secret key'.
To create new user you can use PHP directly or using php wrapper for the plugin.
If you want you can use directly cURL from command line, it could be usefull for someone:
URL="http://<your_server>:<your_port>/plugins/userService/userservice"
PARAMETERS="secret=<yourSecretKey>&type=add&username=<user>&password=<psw>&name=<name>&email=<mail>"
curl ${URL}?${PARAMETERS}
If everithing works, you should receive:
<result>ok</result>
You receive
<error>RequestNotAuthorised</error>
because secret must be the FIRST parameter.
I've never used openfire so this is a stab in the dark. Based on the README, RequestNotAuthorised is returned if:
the secret does not match
the requester IP is invalid
Have you set the secret key (bigsecret) in the User Service page in the Openfire admin console?
Is there a setting for allowed IPs where you can specify your IP?
When I send an email with the PHP Swift mailer to this server: smtp.exchange.example.com like this:
// Load transport
$this->transport =
Swift_SmtpTransport::newInstance(
self::$config->hostname,
self::$config->port
)
->setUsername(self::$config->username)
->setPassword(self::$config->password)
;
// Load mailer
$this->mailer = Swift_Mailer::newInstance($this->transport);
// Initialize message
$this->message = Swift_Message::newInstance();
// From
$this->message->setFrom(self::$config->from);
// Set message etc. ...
// Send
$this->mailer->send($this->message);
I get a strange error back:
Failed to authenticate on SMTP server with username "user#example.com" using 2 possible authenticators
I know for sure that the login-info is correct.
This might be old but somebody might get help through this. I too faced the same problem and received a mail on my gmail account stating that someone is trying to hack your account through an email client or a different site.
THen I searched and found that doing below would resolve this issue.
Go to https://accounts.google.com/UnlockCaptcha
and unlock your account for access through other media/sites.
UPDATE : 2015
Also, you can try this, Go to https://myaccount.google.com/security#connectedapps
At the bottom, towards right there is an option "Allow less secure apps". If it is "OFF", turn it on by sliding the button.
UPDATE : 2021
The google URL has now changed to : https://myaccount.google.com/lesssecureapps. You will be asked to relogin
I had the same issue, so I've disabled one setting on my WHM root login, which is as follows :
WHM > Home > Server Configuration > Tweak Settings > Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) [?]
I really have the same problem, finally, i solved it.
its likey not the Swift Mail's problem. It's Yaml parser's problem.
if your password only the digits, the password senmd to swift finally not the same one.
swiftmailer:
transport: smtp
encryption: ssl
auth_mode: login
host: smtp.gmail.com
username: your_username
password: 61548921
you need fix it with double quotes
password: "61548921"
I just received the same error.
The strange thing is that commented the credential lines
// ->setUsername(self::$config->username)
// ->setPassword(self::$config->password)
And the problem disappeared.
I'm puzzled because the mail server definitely needs those credentials.
I tried almost all the possible suggestions mention here but for me problem got solved after changing "Access for less secure apps" to ENABLE in my Google account security settings tab. Hope this might useful for others !
The server might require some kind of encryption and secure authentication.
see http://swiftmailer.org/docs/sending.html#encrypted-smtp
try putting username in double quote "username", somehow that fixed for me.
I faced the same problem and solved it. Try to log in manually to your gmail account first.
This issue is due to google has detected your gmail account has been abusing. E.g send a lot of emails over a short period of time.
You perhaps use the wrong username.
I had a similar error. Ensure you're not using uppercase while logging into server.
Example: JacekPL#lala.pl
If you use ->setUsername('JacekPL'), this can cause an error. Use ->setUsername('jacekpl') instead. This solved my problem.
First check if there is any connectivity problem and you can reach the SMTP server:
In terminal type:
telnet servername portnumber
If you receive the 220 response you can reach the SMTP server and there is no connectivity problem but if the connection to the server failed see what's wrong in your network.
If the server needs auth try to authenticate on the server by username and password and see if something goes wrong.
At last see if the server requires encryption and if yes openssl and other stuff are configured correctly.
I got the same same error.
I was using gmail account and Google's SMTP server to send emails. The problem was due to SMTP server refusing to authorize as it considered my web host (through whom I sent email) as an intruder.
I followed Google's process to identify my web host as an valid entity to send email through my account and problem was solved.
If you are trying to send mail from your local enviroment eg. XAMPP or WAMP, this error will occur everytime, go ahead and try the same code on your web hosting or whatever you are using for production.
Also, 2 step authentication from google may be the issue.
Strange enough sending emails works again. We did not change anything and the host say they did not either. We think a server restarts or so. It is strange :S