Jump to content

[SOLVED] Very stupid question


Fjerpje

Recommended Posts

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

Link to comment
Share on other sites

$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...

Link to comment
Share on other sites

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");

?>

Link to comment
Share on other sites

Infact i think..  try this below; or use my created template above :D

 

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>");
}

Link to comment
Share on other sites

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");
}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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')";

 

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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  :P

 

Thanks for the help i can move further now! dammm i never had so much spam  :o

 

Edit: Almost threw my pc trough the window

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.