0
I recently changed my apache port by xampp to port 465, but how do I access my localhost on the net now? I put localhost:465/mail/
and does not carry.
0
I recently changed my apache port by xampp to port 465, but how do I access my localhost on the net now? I put localhost:465/mail/
and does not carry.
3
Each of these has no relation to the other, and SMTP, IMAP and POP3 have no link with web page development.
It makes no sense to define the Apache port as the SMTP, it’s the same as waiting for a taxi to take you to the Hawaii, are services for different things.
Apache is to serve web pages, SMTP has to have a program of its own SMTP server, usually contracted accommodations already serve this, if you want to use your own domain.
Now if you’re thinking of using a hosting that already has SMTP service or you’re thinking of using Gmail or Outlook.com you should set up the port directly in Phpmailer, in short, the way is this:
Summarizing Apache has nothing to do with SMTP.
If the SMTP is from an existing server or service, if your account for email in the
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = 'email-ssl.com.br';
$mail->Port = 465;
$mail->SMTPSecure = 'ssl';
$mail->SMTPAuth = true;
$mail->IsHTML(true);
$mail->Username = '[email protected]';
$mail->Password = 'senhadoemail';
If your email is in Gmail:
Gmail needs to free up access, see step by step: /a/41458/3635
$mail->Host = 'smtp.gmail.com';
$mail->Port = 587;
$mail->SMTPSecure = 'tls'; //Gmail usa TLS
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "sua senha";
If your email is live:
$mail->Host = 'smtp.live.com';
$mail->Port = 587;
$mail->SMTPSecure = 'tsl'; //Live usa TLS
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "sua senha";
If the email does not use SSL/TLS then you should remove the line $Mailer->SMTPSecure
(or define how false
) and add the following line:
$mail->SMTPAutoTLS = false;
Getting something like:
$mail->SMTPSecure = false;
$mail->SMTPAutoTLS = false;
$mail->SMTPAuth = true; //Define para autenticar
$mail->Host = '<seu host para SMTP>';
$mail->Port = <SUA PORTA, geralmente 587>;
$mail->Username = '<Seu usuário de e-mail, geralmente o e-mail completo>';
$mail->Password = "sua senha";
With several test I do most of this https://pastebin.com/YErcQV5kerror
Let’s go continue this discussion in chat.
And that saves a question :)
1
Restore your locahost, you probably read wrong about the SMTP port, it is configured within PHP and not localhost.
an example line to configure SMTP in php:
$mail->Port = 465;
If you have more questions follow these tutorials:
Plain Email: https://www.devmedia.com.br/enviando-email-com-php/37216
Email Com SMTP: https://www.gn10.com.br/blog/dicas/envie-emails-php-smtp-gmail-google-apps/
Important:
Some email providers such as gmail by default block less secure application connections and for the recipient to receive the email you have to allow the connection to the gmail sender, in case gmail follow this tutorial: https://support.google.com/accounts/answer/6010255?hl=pt-BR
So in case I don’t need to touch the door of my apache there in the xampp? Can I leave being 8080?
no, this is unnecessary, you only edit the apache port in case it conflicts with any other app that uses the same port, as for example skype.
I get it. I did what you said, but the page just keeps loading and then it turns all white (when I send the email), and there is no email in my gmail. And I tried to do one with the example of github, but it says that the SMTP connection failed
remembering that the email sender of gmail (which will send the email) need to allow, configure gmail to allow unknown connections, google itself has this turorial.
Yes, I’ve done it and it’s still the same
Browser other questions tagged php apache xampp localhost
You are not signed in. Login or sign up in order to post.
What’s the reason for the change? It’s just back to normal
– Julio Henrique
I need to email via SMTP by phpmailer, it says that the smtp port to send the email is this
– Maria
SMTP has nothing to do with HTTP. That is, SMTP does not open via browser, which is exactly what you want to do?
– Guilherme Nascimento
I need to email via SMTP by phpmailer, then it says that the smtp port to send the email is this. So I changed the apache ports to 465, and now my localhost is no longer working, no longer opens the page
– Maria
But that makes no sense, 465 is to use in SMTP which is a protocol, if you set in Apache, which is HTTP you will mix two things that nothing has to be.
– Guilherme Nascimento
So in the case here: /Server name $Mailer->Host = 'localhost:8080'; Ta right?
– Maria
So how would I put the host? I need to send emails by phpmailer which is by SMTP
– Maria
SMTP is a service, if you have an SMTP service installed on your machine will work, otherwise it will not, if you are using an external SMTP service such as gmail, Hotmail (outlook) or yahoo, you have to configure phpmailer as if you were setting up your email client, for example Thunderbird or Outlook, the answer I tried to explain the best that gave https://answall.com/a/259422/3635, read it calmly, because it is clear that you still do not understand the basics of what is SMTP and TCP.
– Guilherme Nascimento