how to activate smtp?
Posted by: dervil (---.6.rev.vline.pl)
Date: April 26, 2018 05:03PM

this is my php.ini file:
[mail function]
; For Win32 only.
; [php.net]
SMTP = localhost
; [php.net]
smtp_port = 25

; For Win32 only.
; [php.net]
sendmail_from ="admin@wampserver.invalid"

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i"winking smiley.
; [php.net]
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On

; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog


yo is my mail.php file
                require_once 'PHPMailerAutoload.php';
		$mail = new PHPMailer;
		$mail->isSMTP();
		$mail->Host = 'I do not know what to write';
		$mail->Port = 25;
		$mail->SMTPAuth = true;
		$mail->Username = '????? I do not know what to write';
		$mail->Password = '????? I do not know what to write';
		$mail->SMTPSecure = 'tls';
		$mail->setFrom('admin@test.com', 'TEST');
		$mail->sendBy = 'TEST';
		$mail->addAddress('test@gmail.com', 'TEST');
		$mail->addReplyTo('test@gmail', 'TEST');
		$mail->Subject = 'TEST';
		$mail->Body    = 'TEST<br>TEST MAIL';
		$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
		if(!$mail->send()) {
			echo 'Message could not be sent.';
			echo 'Mailer Error: ' . $mail->ErrorInfo;
		} 
		else 
		{
			$_SESSION['udana_rejestracja']='EMAIL SEND';
			header
				(
					'Location: contact'
				)
			;
		}

previously I had configured with an external smtp server
for example, gmail.
but I would like to configure settings with the local server
does anyone know how to do it?
what to enter in the fields Host ,Username ,Password ????
what you need to change in apache files, etc.???



Edited 2 time(s). Last edit at 04/26/2018 06:23PM by RiggsFolly.

Options: ReplyQuote
Re: how to activate smtp?
Posted by: RiggsFolly (Moderator)
Date: April 26, 2018 05:08PM

Hi,

What local email server are you using?
What port is it listening on?
Is it on your local machine or another machine in your network?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 04/26/2018 05:16PM by RiggsFolly.

Options: ReplyQuote
Re: how to activate smtp?
Posted by: dervil (---.6.rev.vline.pl)
Date: April 26, 2018 06:15PM

I want to use a local server.
Wamp is set to port 80.
Local machine.
I know how to do it with an external smtp server
but
I do not know how to do smtp on local



Edited 1 time(s). Last edit at 04/26/2018 06:20PM by dervil.

Options: ReplyQuote
Re: how to activate smtp?
Posted by: RiggsFolly (Moderator)
Date: April 26, 2018 06:28PM

No not the port used by WAMPServer.

If you dont have an email server installed, and windows does not come with an email server by default, then this is all a bit academic.
If you install an email server then you will know what ip address to add to the php.ini file, because you will have installed the email server in that ip address.
You would also know what port it would be listening on for SMTP connections.

As it does not appear that you have an email server installed anywhere in your network then you cannot do what you say you want to do!!

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: how to activate smtp?
Posted by: dervil (---.6.rev.vline.pl)
Date: April 27, 2018 05:42PM

I have windows mail, but I have never used it.
Is that what this is about? Do you mean it?

Options: ReplyQuote
Re: how to activate smtp?
Posted by: Otomatic (Moderator)
Date: April 27, 2018 06:44PM

Hi,

> I have windows mail, but I have never used it.
Windows mail IS NOT a Mail Server.

I can only repeat what RiggsFolly has already told you:
If you do not want to use an external Authenticated SMTP, there is no other solution than to install an SMTP Server on your Windows. End of story!

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.5 32 bit - Apache 2.4.37 - PHP 7.2.12/7.1.24/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
Wampserver 3.1.5 64 bit - Apache 2.4.37 - PHP 7.2.12/7.1.24/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
PhPMyadmin 4.8.3 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.