Mailserver link needed... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Mailserver link needed...

Can anyone give me a mailserver link to practice mailing in PHP or any free mailserver dns if you know I have tried lot to find out one but not get any yet...😔 Please share if you know any...

30th Nov 2018, 2:54 PM
Aditya Kumar
Aditya Kumar - avatar
7 Answers
+ 1
In XAMPP you have mail server. Or I use for testing purpose hMailserver. Or if you using linux, just install basic instalation of Postfix, you will be able to send any email. But every time depends where you your email send. If your destination addresses are something like @gmail.com you are maybe not able to recive any email becouse of spam filtering and others things with misconfiguration etc.
30th Nov 2018, 9:15 PM
Michal Dudek
Michal Dudek - avatar
+ 3
Ok thank you sir...
30th Nov 2018, 9:32 PM
Aditya Kumar
Aditya Kumar - avatar
+ 2
I m using WAMP and whenever submitting form getting error in handling ini_set();
30th Nov 2018, 9:18 PM
Aditya Kumar
Aditya Kumar - avatar
+ 2
<?php if($_POST['submit']){ $_email=$_POST['email']; $_message=$_POST['message']; if($_email&&$_message){ $to="adityasuraj31@gamil.com"; $subject="mention here"; ini_set("SMTP","hotmail.shef.co.uk"); $body="Message from $_email \n\n $_message"; $header="From: $_email"; mail($to,$subject,$body,$header); die(); } else{ echo "<h1>Error!!!</h1>"; } } else{ echo "<h1>Something Went Wrong!!</h1>"; } ?>
30th Nov 2018, 9:27 PM
Aditya Kumar
Aditya Kumar - avatar
+ 1
Im not sure about your issue. Can you post here your code snippet of php mail() function?
30th Nov 2018, 9:21 PM
Michal Dudek
Michal Dudek - avatar
+ 1
I was search about WAMP, and I doesnt find any mailserver in this package. I prefer XAMPP, you are able to install on Windows too. Ot just install hMailserver next to your WAMP.
30th Nov 2018, 9:27 PM
Michal Dudek
Michal Dudek - avatar
+ 1
Remove line with ini_set(). 1) You dont have access to SMTP relay on hotmail.shef.co.uk (only if they have open 25 port, but i dont think). 2) You dont need to configure this. If you have installed any own SMTP server on localhost, mail() function of PHP will use it.
30th Nov 2018, 9:33 PM
Michal Dudek
Michal Dudek - avatar