Emails from wamp
Posted by: bjmag94 (58.178.200.---)
Date: October 25, 2017 05:05PM

Hi I have a script on my site that sends e-mails, I have a test script that I will post on here that I use to see whether the e-mail function is working correctly, but it won't send the e-mails, how can I set wamp up to send them?

<?php
/*------------includes--------------*/
include ('../includes/connections.php');
include ('staff_brain_file.php');
include ('staff_style_top.php');
/*------------includes--------------*/
$u['my_email'] = "braidz_magrath@hotmail.com";
$_POST['email'] = "Brady, this is just an email to confirm the e-mail script is working correctly";
if(!mail($u['my_email'],"Test E-mail",$_POST['email'],"From: RC Newsletter <no-reply@site.com>" ))
{
echo "Email not sent to" . $u['my_email'] . "!<br/>";
}
include ('style_bottom.php');
?>



Edited 1 time(s). Last edit at 10/25/2017 05:07PM by bjmag94.

Options: ReplyQuote
Re: Emails from wamp
Posted by: ciprianmp (86.124.173.---)
Date: October 25, 2017 11:41PM

Try not specifying the From: value. Try Reply-To instead.
It is because the latest anti-spoofing measures most ISPs implemented (SPF):
[www.openspf.org]

Ciprian M.

Options: ReplyQuote
Re: Emails from wamp
Posted by: bjmag94 (58.178.200.---)
Date: October 26, 2017 04:21AM

Nope still no change

Options: ReplyQuote
Re: Emails from wamp
Posted by: bjmag94 (58.178.200.---)
Date: October 26, 2017 08:29AM

I worked it out thank you

Options: ReplyQuote
Re: Emails from wamp
Posted by: sTimulated (---.dynamic.dsl.as9105.com)
Date: October 26, 2017 06:17PM

bjmag94 Wrote:
-------------------------------------------------------
> I worked it out thank you


that's great but how as others may need to know.

Options: ReplyQuote
Re: Emails from wamp
Posted by: bjmag94 (58.178.200.---)
Date: October 27, 2017 03:35AM

I changed the mail functions in the php.ini file

[mail function]
; For Win32 only.
; [php.net]
SMTP = www.yourdomain.com
; [php.net]
smtp_port = 25

; For Win32 only.
; [php.net]
sendmail_from ="yourdesiredusername@yourdomain.com"

; 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



Edited 1 time(s). Last edit at 10/27/2017 03:36AM by bjmag94.

Options: ReplyQuote


Sorry, only registered users may post in this forum.