A
A
Alastor2015-06-06 15:39:14
PHP
Alastor, 2015-06-06 15:39:14

How to access gmail mail from the server?

I made a website, I was too lazy to set up a mail server. It is necessary to somehow send out letters after registration, I don’t want to send them through mail (), because over time you will end up in spam.
I registered a mailbox on gmail, I'm trying to send an activation letter. And it answers me that I need to log in from the server IP and allow access from the server in the gmail settings. Access allowed, but requires that you log in from the browser, then you can send letters. The server is ubuntu server, and teamviewer is not an option.
Task: Log in through a browser like a server
What to do:
a) Set up a VPN?
b) I read about utilities that allow you to view sites from the terminal, but it seems nonsense
to me c) Suggest something simple and effective
Thank you

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Valery Ryaboshapko, 2015-06-06
@Alastor

In general, it would be logical to use the Gmail API . They even have ready-made PHP code .

D
Dmitry, 2015-06-06
@zmeyjr

Even there are no thoughts regarding the reasons for such behavior. Just try an SSH tunnel.
Gmail is configured on my VPS something like this www.havetheknowhow.com/Configure-the-server/Instal...
everything works, but I don't need to send many emails.

J
Jon7, 2015-06-07
@Jon7

On Ubuntu, put msmtp to send. Example conf.

account default
logfile /var/log/msmtp.log
host smtp.gmail.com
port 587
from [email protected]
auth on
user [email protected]
password password
tls on
tls_starttls on
tls_certcheck off
keepbcc on

To receive fetchmail + procmail or console client to fetch whole mail.

Y
Yuri, 2015-06-11
@xtreme

Setting up your mailer to send is not as difficult as you think. SPF in DNS and generating DKIM keys takes how many minutes (if done for the first time). Installing Exim and setting it up to add 4+1+1 lines to the default config will also take a few minutes. (4+1 lines for dkim and one more with the server name)
As a result, we have a server for normal sending of signed mail, which does not fall into spam, unless, of course, this same spam is sent. Simple and effective.
And already receiving mail can be done on public services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question