Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 15th January 2013, 16:38
ohdude ohdude is offline
Junior Member
 
Join Date: Jan 2013
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Talking Cannot Send mail & Piwik error

Hi everyone,

I've got a little problem, First of all I cannot send any mails, using the PHP mail function. Using this code

<?php
$datum = date("j/n/Y");
mysql_connect("127.0.0.1", "*****", "*****")or die(mysql_error());
mysql_select_db("c0Controleonline") or die(mysql_error());
$resultuser = mysql_query( "select * from Gebruikers, Meldingen, Plaatsen where Gebruikers.MijnPro = Plaatsen.Provincie and Meldingen.Plaats = Plaatsen.PlaatsID and Gebruikers.Activated = '1' and Meldingen.Sended = '1' and datum = '$datum' ");
if ($resultuser !== false) {
include 'config.php';
while($row=mysql_fetch_array($resultuser)){
$message = "Beste ".$row['Username'].",<br />
Wij hebben weer een melding door gekregen.<br />
Plaats: ".$row['Plaatsnaam']."
<br />Provincie: ".$row['Provincie']."
<br />Datum:".$row['Datum']."
<br />Tijd:".$row['Tijd']."<br />
Ter hoogte van: ".$row['thv']."<br />Melding: <img src=$websiteurl/images/Meld/".$row['soort'] .".jpg /><br /><br />Je krijgt deze meldingen omdat je je aangemeld hebt op $websitetitle. <br /> Wil je dit opzeggen dan kun je dit instellen in je account <br />
<br />
<p><strong>Met vriendelijke groeten,</strong></p>
<p><strong>Het $websitetitle team</strong></p><br />
<br />
$websiteurl";
$subject = "Meldingen";

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'From: Controle-online melder <automailer@controle-online.nl>' . "\r\n";
mail($row['Email'], $subject, $message,$headers);



}
mysql_query("UPDATE Meldingen,Gebruikers,Plaatsen SET Meldingen.Sended='0'
WHERE Gebruikers.MijnPro = Plaatsen.Provincie and Meldingen.Plaats = Plaatsen.PlaatsID and Meldingen.Sended = '1'")or die(mysql_error());
}
else {
echo mysql_error();
}
?>

Database updated but no mail send ,
I cannot connect via example thunderbird


I also cannot reach the twitter API and post on twitter well Itested on another server (my synology server)


Greets,


Daan

PS. Its running on a VPS from https://www.budgetvm.com (openvz)
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR: Connection dropped by IMAP server. [Centos 5.4, courier imap,squirrel, etc] darevil HOWTO-Related Questions 7 9th June 2010 15:49
cyrus-sasl won't install on my ubuntu9.04 kameelperdza Installation/Configuration 1 13th June 2009 11:28
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 13:16
configuring IPTABLES firewall adityavpratap HOWTO-Related Questions 9 27th May 2006 22:42
Installation Fails... :( cyberstorm Installation/Configuration 1 15th January 2006 19:07


All times are GMT +2. The time now is 06:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.