Skip to Content Skip to Menu

email notifications are sent, except for my msg...

15 years 1 month ago #112144 by ProvaStyle
Hi,

Email notifications are sent whenever users create PM's.

But, when I send a PM via php code from one of my custom components, the PM is sent in uddeIM, but there's no email notification sent. I've been reading, and maybe this isn't possible? I thought it worked a long time ago when I developed it, but could be wrong.

I use the php code:
"INSERT INTO #__uddeim (fromid, toid, message, datum, disablereply, systemmessage)
VALUES (62, '$toid', '$wildmsg', '$t', 1, 'System')";


Just to summarize:
email notifications ARE sent from Joomla
email notifications ARE sent from uddeIM when a PM is sent through uddeIM or CB quick msg.
When the above php code is executed, the PM DOES appear in the user's uddeIM inbox, but no email is sent.

Is there something else I can add to my code? I'm sorry if I didn't find it in the FAQ.

Thanks,
-David

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 1 month ago #112151 by slabbi
Just think about it a few secs:

When you write a record directly into uddeIM's database, why should uddeIM send a notification? No uddeIM code is executed while you are writing into the database.

You are responsible to send a notification when you are creating the mail and not uddeIM.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

15 years 1 month ago #112155 by ProvaStyle
That makes sense.

Is there some uddeIM code I can use to send the email? I realize there's the generic sendMail or phpMail stuff I can do, but I really like the way uddeIM does it, with the settings I chose, link & all.

Is there something I can read about how to create it?

In the developer folder I found:
void $uddeim->sendNewMessage($fromid, $toid, $message,
$sendnotification=0, $updatelastsent=0);

Not sure if there's something that tells me how to send a notification just as easily as the FAQ told me how to send a system message.

Thanks,
-David

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 1 month ago #112164 by slabbi
Yes, you can use the experimental API.

In future I will change the way you can use the API (it will be backward compatible).

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

15 years 1 month ago #112167 by ProvaStyle
Thanks,

Are there any known issues with this experimental API?

I've uploaded uddeim.api.php into the com_uddeim folder & entered this code right after sending the PM:

require_once("components/com_uddeim/uddeim.api.php");
$uddeim = new uddeIMAPI();
$fromid=63;
$toid=62;
$message=$wildmsg;
$uddeim->sendNewMessage($fromid, $toid, $message, $sendnotification=0, $updatelastsent=0);

I get this message in my browser window:

"Fatal error: Call to undefined function uddeimencrypt() in /home/provacc/public_html/development/components/com_uddeim/includes.db.php on line 26"

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 1 month ago #112169 by slabbi
Add this line before including the API:

[code:1]require_once("components/com_uddeim/crypt.class.php");[/code:1]

It seems that I have forgotten to include this.

Post edited by: slabbi, at: 2009/09/24 23:42

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum