Fjerpje Posted August 23, 2007 Share Posted August 23, 2007 Eeeh people This might be the dumbest question ever asked but i am buzy writing a management system and now im buzy with the member activation part. Now when a member is succesfully registerd they recieve an email with an activation link but now when i use the mail function and i type in the message with the activation link is simple wouldnt send the email now i tried allot but its just when i insert the link it j ust wouldnt send i just inserted a normal link http://www.blabla.nl/ but it wouldnt send. Does anyone have a answer to this most likely dumb question??? Thanks for your help, Fjerpje Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/ Share on other sites More sharing options...
Fearpig Posted August 23, 2007 Share Posted August 23, 2007 Hello, Post your code and I'm sure people would take a look. Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331721 Share on other sites More sharing options...
XaeroDegreaz Posted August 23, 2007 Share Posted August 23, 2007 No question is a dumb question. If you don't know, you simply don't know Who's more dumb, the person who doesn't ask the question and never gets the answer, or the person who asks the question and learns the answer? Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331732 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 $bericht = "Rally-online account activatie"; $headers = "FROM: Rally-online"; $bericht = "Beste rally-online gebruiker Uw activatie link: http://www.testestest.nl/"; if(mail($email, $onderwerp, $bericht, $headers) == true) { echo("<center>Er is een link verstuurd naar het ingevoerde email adres. Met deze link kunt u uw account activeren. Nadat uw account geactiveerd is kunt u volledig gebruik maken van alle accountsfeatures van rally-online en bent u officieel geregistreerd<br>$terug_1</center>"); } else { echo("<center><br>Er is een fout opgetreden tijdens het verzenden van de email<br>$terug_0"); } ---------------------------------------------------- This code is in dutch but just a simple link like http://www.testestest.nl/ in the mail function doesnt work... Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331739 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 what is the problem? or the errors you encounter? Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331754 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 When i insert that link the mail wouldnt send :-\ Is it possible that its something with my SMTP server? I doubt it but... Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331757 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 try this... <?php $email_to = ""; #email@email.com $email_from = ""; #your from email $subject = "the email subject"; $message = "the message here"; $headers = "From: " . $email_from; mail($to, $subject, $message, $headers); echo ("email sent"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331762 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 Infact i think.. try this below; or use my created template above bericht = "Rally-online account activatie"; $headers = "FROM: Rally-online"; $bericht = "Beste rally-online gebruiker Uw activatie link: http://www.testestest.nl/"; if(!mail($email, $onderwerp, $bericht, $headers)) { echo("<center> Er is een fout opgetreden tijdens het verzenden van de email $terug_0"); } else { echo("<center>Er is een link verstuurd naar het ingevoerde email adres. Met deze link kunt u uw account activeren. Nadat uw account geactiveerd is kunt u volledig gebruik maken van alle accountsfeatures van rally-online en bent u officieel geregistreerd $terug_1</center>"); } Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331764 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 I know that works by reading it but thats not the problem i have the problem when i insert the link like: $message = "Dear user,\nYour activation link is: >>> Here it goes wrong >>> http://www.blablablabla.nl/"; I dont understand why the mail() doesnt send when i put a link in ??? Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331767 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 ohh right, so if you dont have any URL the email will send. and if you add a URL it wont send? Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331771 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 yah axactly :-\ Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331775 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 try this below: $bericht = "Rally-online account activatie"; $url = "http://www.testestest.nl/"; $headers = "FROM: Rally-online"; $bericht = "Beste rally-online gebruiker Uw activatie link: ".$url.""; if(mail($email, $onderwerp, $bericht, $headers) == true) { echo("<center>Er is een link verstuurd naar het ingevoerde email adres. Met deze link kunt u uw account activeren. Nadat uw account geactiveerd is kunt u volledig gebruik maken van alle accountsfeatures van rally-online en bent u officieel geregistreerd $terug_1</center>"); } else { echo("<center> Er is een fout opgetreden tijdens het verzenden van de email $terug_0"); } Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331780 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 Didnt tried that one yet. Ill bet that one works. Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331782 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 try it and see Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331783 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 This is madness it still doesnt work ill post the file instead Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331787 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 else{ $wachtwoord2 = md5($wachtwoord2); $query = "INSERT INTO gebruikers VALUES(null,'$voornaam','$achternaam','$woonplaats','$email','$gebruikersnaam','$wachtwoord2',2,0,'$datum')"; mysql_query($query) or die ("Er is een fout opgetreden tijdens het registreren van de ingevoerde gegevens"); $onderwerp = "Rally-online account activatie"; $headers = "FROM: Rally-online"; $url = "http://www.gebr-sluijer.nl/test/"; $bericht = "Beste rally-online gebruiker\nUw activatie link: $url"; if(mail($email, $onderwerp, $bericht, $headers) == true) { echo("<center>Er is een link verstuurd naar het ingevoerde email adres. Met deze link kunt u uw account activeren. Nadat uw account geactiveerd is kunt u volledig gebruik maken van alle accountsfeatures van rally-online en bent u officieel geregistreerd<br>$terug_1</center>"); } else { echo("<center><br>Er is een fout opgetreden tijdens het verzenden van de email<br>$terug_0"); } } } ----------------------------------------------------------------------- This is the else clausule this happens when the register is fully validated this cant possibly effect that url problem but anyway here is it. Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331789 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 try this.. mysql_query($query) or die (mysql_error()); then paste the error to me I think the problem is this... INSERT INTO gebruikers VALUES(null,'$voornaam','$achternaam','$woonplaats','$email','$gebruikersnaam','$wachtwoord2',2,0,'$datum') should be like... INSERT INTO gebruikers (`field_one`, `field2`) VALUES(null, '$var_one')"; Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331794 Share on other sites More sharing options...
MadTechie Posted August 23, 2007 Share Posted August 23, 2007 Try this <?php mysql_query($query) or die ("Er is een fout opgetreden tijdens het registreren van de ingevoerde gegevens"); //--Snip $email_from = "webmaster@gebr-sluijer.nl"; $onderwerp = "Rally-online account activatie"; $mime_boundary = "----Rally-online----".md5(time()); $headers = "From: Rally-online <$email_from>\n"; $headers .= "Reply-To: Rally-online <$email_from>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n"; $url = "http://www.gebr-sluijer.nl/test/"; $bericht = "Beste rally-online gebruiker\nUw activatie link: <a href='$url'>here</a>"; ini_set("sendmail_from", $email_from); //---End Snip if(mail($email, $onderwerp, $bericht, $headers) == true) { ?> PS the only stupid questions is the unasked one EDIT: if this fails comment out the $URL line change $url = "http://www.gebr-sluijer.nl/test/"; to //$url = "http://www.gebr-sluijer.nl/test/"; and try that, (just need to know the patten) Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331805 Share on other sites More sharing options...
Fjerpje Posted August 23, 2007 Author Share Posted August 23, 2007 Oh my god!!! it always worked!!! Dam spam filter of GMAIL! AAARG never thougt about that. All the times i registrered the emails were marked as spam by gmail. This will keep searching though Thanks for the help i can move further now! dammm i never had so much spam Edit: Almost threw my pc trough the window Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331814 Share on other sites More sharing options...
MadTechie Posted August 23, 2007 Share Posted August 23, 2007 dammm i never had so much spam you can have some of my spam if you like, i have loads LOL Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331817 Share on other sites More sharing options...
xyn Posted August 23, 2007 Share Posted August 23, 2007 dammm i never had so much spam you can have some of my spam if you like, i have loads LOL or mine [: Quote Link to comment https://forums.phpfreaks.com/topic/66310-solved-very-stupid-question/#findComment-331822 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.