Welcome Guest, Not a member yet? Register   Sign In
Problem to send email to gmail adresse
#1

Hi everybody, 

When from my back office i try to send emails, it works with all domaine but not with Gmail.

When I send email to two address , one hotmail and one gmail, I only recieved it on my hotmail mail box.
In this email I can see that this email as been also sent to my gmail address but I didn't recieved it.

How can I fixed it ?
Reply
#2

Spam box?
Keep calm.
Reply
#3

not even in the spam box.
I have checked all the mailbox.
It happens only for gmail boxes
Reply
#4

Typically, emails get refused on tuns of issues: SPF DNS record, reverse DNS setup for the mailhost, DMARC settings etc. This has nothing to do with CI or gmail, it's a server thing.

Best place to start is talk to the one responsible for your server/mailserver. Do try you send it directly as smtp to gmail or do use a different smtp server?
Reply
#5

we use smtp from gmail
Reply
#6

Re up : I didn't find a solution...

May the config can help you ?

[[email protected] ~]# dig mx academiamentis.be
0 ASPMX.L.GOOGLE.COM.
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
10 ALT3.ASPMX.L.GOOGLE.COM.
10 ALT4.ASPMX.L.GOOGLE.COM.
Reply
#7

As @Diederik said, it's not a CI problem but a server issue. Try talking to your hosting provider? They know what to do.
Best regards,
José Postiga
Senior Backend Developer
Reply
#8

(This post was last modified: 01-21-2016, 11:54 AM by Diederik.)

My dig output shows another MX record for your domainname: mail.jplx.sc.

Code:
;; ANSWER SECTION:
academiamentis.be. 283 IN MX 10 mail.jplx.sc.
academiamentis.be. 283 IN MX 5 alt1.aspmx.l.google.com.
academiamentis.be. 283 IN MX 5 alt2.aspmx.l.google.com.
academiamentis.be. 283 IN MX 5 aspmx.l.google.com.
academiamentis.be. 283 IN MX 10 alt3.aspmx.l.google.com.
academiamentis.be. 283 IN MX 10 alt4.aspmx.l.google.com.

Both mail.jplx.sc and academiamentis.be point to the same IP. I suspect that your e-mail is delevered localy on your hosting server instead of to Gmail.

You could eliminate this problem by a) remove that MX record, or b) use gmail to send the messages itself instead of your local host:
PHP Code:
$config['protocol'] = "smtp";
$config['smtp_host'] = "ssl://smtp.gmail.com";
$config['smtp_port'] = "465";
$config['smtp_user'] = "[email protected]";
$config['smtp_pass'] = "Password";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";

$this->email->initialize($config);

$this->email->from('[email protected]''Academiamentis');
$this->email->to('[email protected]');
$this->email->subject('This is an email test');
$this->email->message('Lorem ipsum...');
$this->email->send(); 

Although it is server related you can probably circumvent the issue.
Reply
#9

Hi,

In message #5, you mention you are using gmail SMTP !
So is your problem about receiving the email or about sending it ?

If you really are sending emails using gmail SMTP, then you have to declare in your gmail configuration that you will send emails from outside gmail apps.
Go to that URL for that: https://www.google.com/settings/security/lesssecureapps


Cheers,
[email protected]
Reply
#10

hello, I have tried all of this, and nothing is doing beter...
Could it be possible that it is a problem with my code
I have reset all MX records like google ask.

i think it's a google App wch generate auto invite by mail
Reply




Theme © iAndrew 2016 - Forum software by © MyBB