+ 1
How to send a mail in php with html table,I received an smtp port 25 error msg
5 Answers
+ 1
Note, if you upload to a hosting service, it will probably work.
+ 1
<?php
$to = 'maryjane@email.com';
$subject = 'Marriage Proposal';
$message = 'Hi Jane, will you marry me?';
$from = 'peterparker@email.com';
// Sending email
if(mail($to, $subject, $message)){
echo 'Your mail has been sent successfully.';
} else{
echo 'Unable to send email. Please try again.';
}
?>
0
I actually tried this,but the same error occurs....
0
You'll need to show your code then. Also check PHP logs. Again, this is why frameworks are better than coding this stuff yourself