i added the line…it still doesnt work
i’m thinking it’s probably my php.ini file, here is the only change i’ve made to it SINCE i’ve installed phpmailer: (NOTE: I’M TESTING MY LOCAL FILES ON APACHE)
I presume when you say Local Files on Apache you mean locally on your own machine and not on a hosted server? If so unless you have an SMTP server running then I can’t see that working. Change the SMTP from localhost to your SMTP address of your ISP. Also if you’re using SMTP email then you need the second line I mentioned earlier, the IsSMTP() line, plus you also need to include the SMTP class in the same directory as your phpmailer class.
Putting SMTP won’t work unless you have a mail server setup on your localhost.
An excerpt of my php.ini:
[mail function]
; For Win32 only.
SMTP = mail.tpg.com.au
smtp_port = 25
; For Win32 only.
sendmail_from = myusername@tpg.com.au
tpg is my ISP and I connect to their mail server using my username. This is why there is a lag when your local PHP scrips send email, because they take a little longer to connect to the ISPs server.
and then use the IsSMTP() function because this is what you’re using, an SMTP server instead of *nix Sendmail. ie. have for your PHP
require("phpmailer-1.73/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
and use cranial-bore’s excerpt above, changing the SMTP address to the SMTP address that your mail program such as Outlook uses. If you don’t use a from address then the sendmail_from address should be filled in (to be honest it’s best for safety anyhow), again use your own email address.
then in theory it should work providing your ISP will allow the email to go through in this manor (as some may bounce it back).