×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: send mail

send mail 15 years 9 months ago #2626

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
is it impossible that when a comment submitted a mail send to adminiistrator?
sorry but i want to find a good place for this question but i cant

send mail 15 years 9 months ago #2631

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
is it impossible?

send mail 15 years 9 months ago #2643

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
can answer to me?
is it possible?

send mail 15 years 9 months ago #2644

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Reza, sorry for not answering immediately, but I had to test it first. It seems impossible right now, but this is for me a bug. Version 4.0 will be able to send mails to super admins.

send mail 15 years 9 months ago #2645

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
thanks for your helping boss
but i use 3.26
can i do some thing?

send mail 15 years 9 months ago #2648

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Are you using joomla 1.5? If yes, please test the following thing for me.

Go to components/com_comment/joscomment/utils.php

find the function
function notifyMailList( &$maillist )
    {	
        global $mosConfig_live_site, $mosConfig_mailfrom, $mosConfig_fromname;
 
		$sentmail = '';
 
        if (!is_array($maillist) || count($maillist)<=0) return $sentmail;
 
        $comment_id     = $this->_comment_id;	/* obligatory */
        $contentid      = $this->_content_id;	/* obligatory */
        $component		= $this->_component;	/* obligatory */
        $comObject		= $this->_comObject;	/* obligatory */
        $name           = $this->lists['name'];
        $title          = $this->lists['title'];
        $notify         = $this->lists['notify'];
        $comment  		= $this->lists['comment'];
 
        $subject		= $this->lists['subject'];
        $message		= $this->lists['message'];
 
//        $articlelink = $mosConfig_live_site.'/index.php?option='.$component.'&task=view&id='.$contentid.($Itemid ? "&Itemid=$Itemid" : "").($comment_id ? "#josc$comment_id" : "");
        $articlelink = $comObject->linkToContent($contentid, $comment_id, true);
 
		$subject = str_replace('{title}'	, $title,$subject);
		$subject = str_replace('{name}'		, $name,$subject);
		$subject = str_replace('{notify}'	, ($notify ? "yes" : "no"),$subject);
 
		$message = str_replace('{livesite}'	, $mosConfig_live_site,$message);
		$message = str_replace('{title}'	, $title,$message);
		$message = str_replace('{name}'		, $name,$message);
		$message = str_replace('{notify}'	, ($notify ? "yes" : "no"),$message);
		$message = str_replace('{comment}'	, $comment,$message);
		$message = str_replace('{linkURL}'	, $articlelink,$message);
/*
        $subject = 'NewComment :'.$title."[from:".$name."][notify:".($notify ? "yes" : "no")."]";
 
        $message = '<p>A user has posted a new comment to a content item you have subscribed <br />in '.$mosConfig_live_site.':</p>';
        $message .= '<p><b>Name: </b>'.$name.'<br />';
        $message .= '<b>Title: </b>'.$title.'<br />';
        $message .= '<b>Text: </b>'.$comment.'<br />';
        $message .= '<b>Content item: </b><a href="'.$articlelink.'">'.$articlelink.'</a></p>';
 
        $message .= "<p>Please do not respond to this message as it is automatically generated and is for information purposes only.</p>";
*/
        foreach($maillist as $mail)
			if (mosMail($mosConfig_mailfrom, $mosConfig_fromname,$mail, $subject, $message, true ))
				$sentmail .= ($sentmail ? ';' : '').$mail;
 
		return $sentmail;
    }
 

and replace it with
  function notifyMailList( &$maillist )
    {
        $mailer =& JFactory::getMailer();
 
	$sentmail = '';
 
        if (!is_array($maillist) || count($maillist)<=0) {
	    return $sentmail;
	}
 
        $comment_id     = $this->_comment_id;	/* obligatory */
        $contentid      = $this->_content_id;	/* obligatory */
        $component		= $this->_component;	/* obligatory */
        $comObject		= $this->_comObject;	/* obligatory */
        $name           = $this->lists['name'];
        $title          = $this->lists['title'];
        $notify         = $this->lists['notify'];
        $comment  		= $this->lists['comment'];
 
        $subject		= $this->lists['subject'];
        $message		= $this->lists['message'];
 
        $articlelink = $comObject->linkToContent($contentid, $comment_id, true);
 
		$subject = str_replace('{title}'	, $title,$subject);
		$subject = str_replace('{name}'		, $name,$subject);
		$subject = str_replace('{notify}'	, ($notify ? "yes" : "no"),$subject);
 
		$message = str_replace('{livesite}'	, JURI::base(),$message);
		$message = str_replace('{title}'	, $title,$message);
		$message = str_replace('{name}'		, $name,$message);
		$message = str_replace('{notify}'	, ($notify ? "yes" : "no"),$message);
		$message = str_replace('{comment}'	, $comment,$message);
		$message = str_replace('{linkURL}'	, $articlelink,$message);
/*
        $subject = 'NewComment :'.$title."[from:".$name."][notify:".($notify ? "yes" : "no")."]";
 
        $message = '<p>A user has posted a new comment to a content item you have subscribed <br />in '.JURI::base().':</p>';
        $message .= '<p><b>Name: </b>'.$name.'<br />';
        $message .= '<b>Title: </b>'.$title.'<br />';
        $message .= '<b>Text: </b>'.$comment.'<br />';
        $message .= '<b>Content item: </b><a href="'.$articlelink.'">'.$articlelink.'</a></p>';
 
        $message .= "<p>Please do not respond to this message as it is automatically generated and is for information purposes only.</p>";
*/
        foreach($maillist as $mail) {
 
            if (JUTility::sendMail($mailer->From, $mailer->FromName, $mail, $subject, $message, true, $mailer->cc, $mailer->bcc, $mailer->attachment, $mailer->ReplyTo, $mailer->FromName )) {
				$sentmail .= ($sentmail ? ';' : '').$mail;
            }
        }
		return $sentmail;
    }

send mail 15 years 9 months ago #2649

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
yeah i use joomla 1.5 and i do that change?

send mail 15 years 9 months ago #2653

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Try to change it. I'm wondering if it is going to help. On my localhost I manage to get the e-mail as super admin.

send mail 15 years 9 months ago #2693

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
hi
i do it and its my util.php
but any mail send ed utils.zip

send mail 15 years 9 months ago #2694

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
the code is not working for you?
  • Page:
  • 1
Time to create page: 0.175 seconds