Email and eCards problems in Yahoo! and Hotmail Email and eCards problems in Yahoo! and Hotmail
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Email and eCards problems in Yahoo! and Hotmail

Started by renearcia, February 04, 2007, 07:42:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

renearcia

Hi, I have installed cpg1.4.9 and when I send email or eCards to mail servers like Yahoo!, Hotmail and Cantv (my own email address) there is no body in the mail, only the subject appears.

The first time I Sign In this forum, I receive your Welcome and activation link without any problem (it is visible at all), then I want to do the same in my Coppermine Gallery http://www.cantaura.net/gente/index.php

Only Gmail from google has no problem with this.

Thanks.

renearcia

Quote from: renearcia on February 04, 2007, 07:42:51 PM
Hi, I have installed cpg1.4.9 and when I send email or eCards to mail servers like Yahoo!, Hotmail and Cantv (my own email address) there is no body in the mail, only the subject appears.

The first time I Sign In this forum, I receive your Welcome and activation link without any problem (it is visible at all), then I want to do the same in my Coppermine Gallery http://www.cantaura.net/gente/index.php

I am using sendmail.

Only Gmail from Google has no problem with this.

Thanks.

Joachim Müller

Ecards are disabled for guest on your gallery. Either provide a non-admin test user account or allow anonymous ecards to allow us to look into this.

renearcia

Hi, thanks for your quick answer, I made some changes in the code and now is working both Yahoo! and Hotmail.

Here is the change.

In the file "yourgallery/include/mailer.inc.php", inside the Class PHPMailer find the function CreateHeader() and go to this part around the line number 907


Quote
        switch($this->message_type)
        {
            case "plain":
                $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding);
                $result .= sprintf("Content-Type: %s; charset=\"%s\"",
                                    $this->ContentType, $this->CharSet);
                break;
            case "attachments":
                // fall through
            case "alt_attachments":
                if($this->InlineImageExists())
                {
                    $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",
                                    "multipart/related", $this->LE, $this->LE,
                                    $this->boundary[1], $this->LE);
                }
                else
                {
                    $result .= $this->HeaderLine("Content-Type", "multipart/mixed;");
                    $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
                }
                break;
            case "alt":
                $result .= $this->HeaderLine("Content-Type", "text/html; charset=\"%s");   //I force the content-type to "text/html"
//             "multipart/alternative;");      //This was the original part of the code I delete
//                $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');        //This line too
                $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding);
//                $result .= sprintf("Content-Type: text/html; charset=\"%s\"",             //This two lines don't look well at the begining of the message
//                                    $this->ContentType, $this->CharSet);
                break;
        }

        if($this->Mailer != "mail")
            $result .= $this->LE.$this->LE;

        return $result;
    }


Now go to function CreateBody() and I delete the lines above, around 958 to the 963

Quote

    function CreateBody() {
        $result = "";

        $this->SetWordWrap();

        switch($this->message_type)
        {
            case "alt":
//                $result .= $this->GetBoundary($this->boundary[1], "",
//                                              "text/plain", "");
//                $result .= $this->EncodeString($this->AltBody, $this->Encoding);
//                $result .= $this->LE.$this->LE;
//                $result .= $this->GetBoundary($this->boundary[1], "",
//                                              "text/html", "");
                $result .= $this->EncodeString($this->Body, $this->Encoding);
                $result .= $this->LE.$this->LE;
            
//      Desde aqui puedo colocar lo que me de la gana OJO
//                $result .= $this->EndBoundary($this->boundary[1]);
                break;
            case "plain":
                $result .= $this->EncodeString($this->Body, $this->Encoding);
                break;
            case "attachments":
                $result .= $this->GetBoundary($this->boundary[1], "", "", "");
                $result .= $this->EncodeString($this->Body, $this->Encoding);
                $result .= $this->LE;



Now I find another problem in the confirmation e-mail for new registers, in the file "yourgallery/lang/yourlanguage.php" find this variable: $lang_register_confirm_email and change the block {PASSWORD} to {USER_PASSWORD}

Quote

$lang_register_confirm_email = <<<EOT
Gracias por registrarte en {SITE_NAME}, Tu nombre de usuario es: "{USER_NAME}", Tu contrase&ntilde;a es: "{USER_PASSWORD}"

Para terminar de activar tu cuenta, debes pulsar sobre el enlace que aparece debajo o copiarlo y pegarlo en tu navegador de InterNet.


and go to the file "yourgallery/register.php" direct to the conditional "if (isset($_GET['activate']))" around the line number 329 and then find this:

                if ($CONFIG['admin_activation']==1) { //after admin approves, user receives email notification
                        msg_box($lang_register_php['information'], $lang_register_php['acct_active_admin_activation'], $lang_continue, 'index.php');
                        $site_link = $CONFIG['site_url'];
                        $template_vars = array(
                         '{SITE_LINK}' => $site_link,
                         '{USER_NAME}' => $user_name,
                         '{SITE_NAME}' => $CONFIG['gallery_name'],


you must to add this new line '{USER_PASSWORD}' => $password, like this

Quote
                if ($CONFIG['admin_activation']==1) { //after admin approves, user receives email notification
                        msg_box($lang_register_php['information'], $lang_register_php['acct_active_admin_activation'], $lang_continue, 'index.php');
                        $site_link = $CONFIG['site_url'];
                        $template_vars = array(
                         '{SITE_LINK}' => $site_link,
                         '{USER_NAME}' => $user_name,
                         '{USER_PASSWORD}' => $password,
                         '{SITE_NAME}' => $CONFIG['gallery_name'],


I keep on working.

You are invited to register on the gallery to confirm this and improve all you the best you think.

Thanks a lot

Joachim Müller

Quote from: renearcia on February 05, 2007, 11:47:23 PMYou are invited to register on the gallery to confirm this and improve all you the best you think.
Sorry, we don't go through registration just to test things.