een link klikbaar maken in activatie mail

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Leon den H

Leon den H

27/02/2011 01:16:58
Quote Anchor link
Hallo,

Ik heb een inlogscipt. Deze werkt goed, echter heb ik een klein probleempje met de activatiemail. De activatiemail krijg ik altijd keurig in de mail, maar de link is niet klikbaar. De link moet eerst gekopieerd worden in de adresbalk, maar volgens mij moet het ook anders kunnen. Alleen weet ik niet hoe....

Onderstaand de code waar het bij hoort:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

            // getting ready to send the email
            require_once($this->mail_phpmailer);
            $mail = new PHPMailer();
            $mail->CharSet  = $this->mail_CharSet;
            $mail->From     = $this->mail_From;
            $mail->FromName = $this->mail_FromName;
            $mail->Subject  = $this->mail_LostPassSubject;
            $body = file_get_contents($this->mail_LostPassEmailTemplate);
            $body_plain = file_get_contents($this->mail_LostPassEmailTemplatePlain);
            $mainUrl = str_replace("ajax/forgottenPassword.php", "", "http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]);
            $body = str_replace("[VERIFICATION_URL]", $mainUrl."index.php?uid=".$line['Id']."&auth_code=".$code, $body);
            $body_plain = str_replace("[VERIFICATION_URL]", $mainUrl."index.php?uid=".$line['Id']."&auth_code=".$code, $body_plain);
            $mail->MsgHTML($body);
            $mail->AltBody  = $body_plain;
            $mail->AddAddress($email);
            $mail->Send();
            $mail->ClearAddresses();
            
            return '1';
        }

        
        return '0';
    }

?>


Hoop dat jullie mij kunnen helpen
Gewijzigd op 27/02/2011 01:17:43 door Leon den H
 
PHP hulp

PHP hulp

26/04/2024 21:29:14
 
Sander de Vos

Sander de Vos

27/02/2011 01:20:28
Quote Anchor link
Stuur je e-mail met HTML headers, en zet je link in a href tags?
 
Leon den H

Leon den H

27/02/2011 11:38:10
Quote Anchor link
Wanneer ik het in een a href zet krijg ik de volgende foutmelding:

Parse error: syntax error, unexpected '<' in /home/****/domains/mijndomein.nl/public_html/class/profilUsers.class.php on line 373

Dit is wat ik gedaan heb
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?php
$body
= str_replace("[VERIFICATION_URL]", <a href="$mainUrl."index.php?verification=".$code, $body">;
                $body_plain = str_replace("[VERIFICATION_URL]", <a href="$mainUrl."index.php?verification=".$code, $body_plain)">;  

?>


Hoor het wel
 
Vincent Huisman

Vincent Huisman

27/02/2011 12:11:30
Quote Anchor link
het moet wel tussen quotes
 
Wesley PHP

Wesley PHP

27/02/2011 12:11:38
Quote Anchor link
EDIT: Vincent was eerder.
Gewijzigd op 27/02/2011 12:13:37 door Wesley PHP
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.