hoopplaya4 Posted June 12, 2008 Share Posted June 12, 2008 Hey all, I've spent several hours googling and browsing through forums, but cannot find any concrete help. I'm new to PHP, and loving what I'm learning so far. I've run into a little bit of trouble with trying to get PHPMailer installed and getting it to work. Unfortunately (against my will), the site I'm working on is on a shared server on GoDaddy. I've heard several great things about PHPMailer, and how awesome it is, however, I cannot get the test_mail.php to work. When I browse to the page, I see "Message Sent!" but I see nothing in the my inbox. I hope I'm not overlooking anything, but any help would be great! Am I doing something wrong? Is there something wrong with my code? I'm testing the default "test" file that comes with PHPMailer, (of course I'm entering in my email address). test_mail.php: <?php include_once('../class.phpmailer.php'); $mail = new PHPMailer(); // defaults to using php "mail()" $body = $mail->getFile('contents.html'); $body = eregi_replace("[\]",'',$body); $mail->From = "xxxx@xxxx.com"; //this is where I'm entering my email address of where I want it sent to-- is this correct?[/color] $mail->FromName = "Kyle"; $mail->Subject = "PHPMailer Test Subject via mail()"; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $mail->AddAddress("whoto@otherdomain.com", "John Doe"); $mail->AddAttachment("images/phpmailer.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } ?> Quote Link to comment Share on other sites More sharing options...
ratcateme Posted June 12, 2008 Share Posted June 12, 2008 who are you sending this to have you checked the spam box on that account? Scott. Quote Link to comment Share on other sites More sharing options...
hoopplaya4 Posted June 12, 2008 Author Share Posted June 12, 2008 Hey Scott, Thanks for the reply. I'm sending this to myself, it's a gmail account. And yes, I have checked the spam box as well. I put the address in the "$mail->From = "xxxx@xxxx.com" field. (My email where the xxxx's are). Is there somewhere else I'm supposed to enter the email address I'm sending to. It's been a long day, so sorry if I'm overlooking something. Thanks. Quote Link to comment Share on other sites More sharing options...
hoopplaya4 Posted June 12, 2008 Author Share Posted June 12, 2008 Anyone else have any ideas? ??? Quote Link to comment Share on other sites More sharing options...
conker87 Posted June 12, 2008 Share Posted June 12, 2008 Any errors? Quote Link to comment Share on other sites More sharing options...
hoopplaya4 Posted June 12, 2008 Author Share Posted June 12, 2008 None that I can see on the front end. All I see is "Message Sent!" Not sure where to look for errors on the server-side with GoDaddy. Quote Link to comment Share on other sites More sharing options...
conker87 Posted June 12, 2008 Share Posted June 12, 2008 I can't really help, don't use this class. Sorry Quote Link to comment Share on other sites More sharing options...
hoopplaya4 Posted June 12, 2008 Author Share Posted June 12, 2008 Ok. Thanks. If anyone else knows anything about using PHPMailer, that'd be great. Thanks. Quote Link to comment Share on other sites More sharing options...
jonsjava Posted June 12, 2008 Share Posted June 12, 2008 I never was impressed with phpmailer. When I was looking for a robust class for one of my projects <insert project plug>Mail Group Solution</plug>, I gave that one a go, and decided to stay away from that, and use MIME mailer from PHP Guru. If you decide to give it a go, I can work up a example script for you. Quote Link to comment Share on other sites More sharing options...
hoopplaya4 Posted June 12, 2008 Author Share Posted June 12, 2008 Hey jonsjava: I'd be willing to give MimeMail a shot-- I'm just looking for something that can send an attachment. Essentially, what I'm trying to is have a user submit a form online, then have the form generated as a PDF with tcpdf, and then have a mailer send the email as an attachment. Would MimeMail help me out with this, you think? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.