I don't really hope anybody understand what i'm talking about. But i really want to connect to smtp.gmail.com to send email from http connection (port 80 or 8080), not ssl connection. Is it can be done? Or is it really something stupid?
-
Just to clarify: You just want to send an email to gmail via smtp but you are not going to use SSL. Is that correct? Do you just need the SMTP settings to connect? – aenw Mar 08 '15 at 09:24
-
mmm...no idea to describe..just want to make a mechanism to send email through smtp server but not using SSL.. – imilah Mar 08 '15 at 09:50
2 Answers
SMTP and HTTP(S) are two different protocols, so the simple answer is "no".
However, you may be aware that Microsoft Exchange allows you to log into your inbox via a browser-based webmail interface - a HTTP(S) front-end that interacts with the email server. In other words: Yes, it is possible to interact with an email server using methods other than SMTP, but you'd need to build a HTTP interface for it yourself:
[Browser] <--HTTP--> [Web Server] <--SMTP--> [Email Server]
For example, Ruby on Rails has ActionMailer, which allows you to send emails in response to a user visiting a certain page in their browser. You simply need to provide details about the GMail SMTP settings so that Rails can communicate with it.

- 4,632
- 6
- 28
- 45
-
-
Yep: See http://php.net/manual/en/book.mail.php and http://stackoverflow.com/q/11942896/4200092 – GoBusto Mar 08 '15 at 10:00
Based on this Google page, there is a gmail server that does not use SSL, but
- it is only for "sending from a printer, scanner, [Google] app", and
- you can only use it to send email to other Gmail accounts or Google apps. (But you could set some forwarding rules if you're sending to a known and limited set of recipients.)
The page gives you the SMTP settings. If those two restrictions are ok with you, then you can look at all of the answers to "Send email using the GMail SMTP server from a PHP page" see different ways you can send using PHP.