Smtp is not sending mail to gmail users

SMTP hosted on infinityfree server is not sending the verification mail to Gmail users while it’s sending to temp mail accounts as i figured out it’s the problem from hosting side .plz solve the problem. Domain is Gmail SMTP , Is there any other method if not then How to set up spf and dkim? Can you set up for ssc.free.nf

This info may help?

1 Like

@solace-ken - those links are not helpful. The OP already has SMTP setup, and is not trying to use mail().

@techmatic - Can you share your SMTP setup? Please hide only the SMTP password. Also, what platform are you using to send the emails? Turning on error logs may give additional insight.

7 Likes

gmail.smtp.
it is basically inbuild savasoft quiz codeigniter. the smtp setting is inside the config.php
as:

// email sending protocol mail or smtp

$config['protocol']=$csetting['Email_protocol'];

/*

| SMTP configuration to send email to user just after submitting quiz

| This feature is under testing version, We are not responsible if it does not work with any devices or browsers.

*/

// smtp hostname eg. smtp.gmail.com

$config['smtp_hostname'] = $csetting['SMTP_hostname'];

// smtp username

$config['smtp_username'] = $csetting['SMTP_username'];

// smtp password

$config['smtp_password'] = $csetting['SMTP_password'];

// smtp outgoing port. eg for gmail its 465, outlook 587, yahoo 465 for other contact your mailing administrator

$config['smtp_port'] = $csetting['SMTP_port'];

// smtp timeout default 5 seconds

$config['smtp_timeout'] = "5";

// smtp tls

$config['starttls'] = TRUE;

// new line

$config['newline'] = "\r\n";

// email message content text of html.

// In html email make sure you don't have any relative links or relative image paths otherwise they will not work.

$config['smtp_mailtype'] = $csetting['SMTP_mailtype'];

// activation email subject

$config['activation_subject'] = $csetting['Activation_email_subject'];

// activation email message

$config['activation_message'] = $csetting['Activation_email_message'];

// password reset email subject

$config['password_subject'] = $csetting['Password_change_subject'];

// password reset email message

$config['password_message'] = $csetting['Password_change_message'];

// enable or disable result email. use true or false

$config['allow_result_email']=$csetting['Send_result_email'];

// Default result message

// you can use below tags and system replace it with related variables.

// [username] [email] [first_name] [last_name] [score_obtained] [percentage_obtained] [result_status] [quiz_name] [current_date]

$config['result_message'] = $csetting['Result_email_message'];

// result email subject

$config['result_subject'] = $csetting['Result_email_subject'];

// email send from

$config['fromemail']=$csetting['SMTP_username'];

// from name

$config['fromname']="Administrator - Quiz Portal";

That does not share the actual configuration. Please share the code/configuration with the SMTP credentials. Remember to hide the password.

7 Likes

ok . it is github codes repository of savasoftquiz that i have uploaded ip is softfail for mail : https://github.com/savsofts/savsoftquiz_v5/blob/master/system/libraries/Email.php
Now, it’s not sending to temp mail also :expressionless:
here are smtp credentials:

SMTP hostname
ssl://smtp.gmail.com
SMTP username
[email protected]
SMTP password
mypassword
SMTP port
465
Verify user email
Enabled
Email protocol
mail
SMTP mailtype
text

Can you try mygmailid instead?

If it does not work, you should try contacting the developer for help

I think I see the problem. The email protocol, if you’re using SMTP, must be smtp and not mail, as mail will use the default mail() function which doesn’t work anymore on free hosting. The username is right; for Gmail SMTP it should be the Gmail email address.

7 Likes

after changing the mail to smtp following error occured :

SSL operation failed with code 1. OpenSSL Error messages:

error:1408F10B:SSL routines:ssl3_get_record:wrong version number /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:34:06 --> Severity: Warning --> fsockopen(): Failed to enable crypto /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:34:06 --> Severity: Warning --> fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:34:17 --> Severity: Warning --> fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:

error:1408F10B:SSL routines:ssl3_get_record:wrong version number /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:34:17 --> Severity: Warning --> fsockopen(): Failed to enable crypto /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:34:17 --> Severity: Warning --> fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

It tries to connect with the STARTTLS port on a SSL/TLS enabled server. Try to set tls://smtp.gmail.com as hostname instead, as that should imply it to connect with STARTTLS.

2 Likes

after changing hostname :

ERROR - 2023-08-03 17:42:44 --> Severity: Warning --> fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:

error:1408F10B:SSL routines:ssl3_get_record:wrong version number /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:42:44 --> Severity: Warning --> fsockopen(): Failed to enable crypto /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

ERROR - 2023-08-03 17:42:44 --> Severity: Warning --> fsockopen(): unable to connect to tls://smtp.gmail.com:587 (Unknown error) /home/vol11_7/infinityfree.com/if0_34690694/htdocs/system/libraries/Email.php 2069

solved as i used wrong port:587 that was for tls
right port : 465 for ssl
and changed mail to smtp solved the all problems like cherry on cake ,
thank you so much… :+1:

2 Likes

i am geeting this error:

as gmail user got this varification link it shows as above alert. can you provide the solution, plz… :slight_smile:

One of the tips I can give you is to make sure the sender’s name matches that of the Google account you’re using to send emails. Like so, Google knows it’s an email coming from your Google account and won’t mark it as phishing. If it still doesn’t work and gives a phishing email warning again, let me know.

1 Like

No it doesn’t work same alert

It’s an email you composed and you sent with your SMTP account that’s being flagged as suspicious by your email provider. I don’t know what you expect from us here, we’re not a party of your email sending practices.

We’re not email experts. We wouldn’t tell you to use third party services if we did.

2 Likes

I don’t know much, I thought because php mail and smtp is hosted on infinityfree then it’s flagged by gmail and if it is experienced by anyone then maybe a solution :thinking:

We’re not hosting SMTP. The SMTP is hosted by the email provider you are choosing to use. We specifically do not host any SMTP ourselves.

2 Likes

Sorry i mean php mail codes

Why would that have anything to do with it? Your SMTP provider is the one that is sending the email to your users email clients, any code you have on your website is not read by the email clients.

You would probably have better luck contacting your SMTP provider about this, as they have a lot more information then we do regarding your sending habits.

6 Likes