undefined function mail_api_connect

sanduhrs - July 9, 2008 - 10:21
Project:Webmail Plus
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:scripthead
Status:closed
Description

Fatal error: Call to undefined function mail_api_connect() in /[...]/sites/default/modules/webmail_plus/webmail_plus.module on line 491
looking into mail_api.module there is no function named mail_api_connect().

#1

scripthead - July 9, 2008 - 13:14

This has to do with the fact that my patch wasn't applied to Mail API. I am trying to work with the original developer to make this happen.

You can download my build of Mail API from this page: http://www.firmidea.com/webmail-plus/2-0

#2

sanduhrs - July 14, 2008 - 19:40

There is nothing available for download from that page.

#3

scripthead - July 14, 2008 - 19:45

Ooops, forgot to give correct permissions to unauthenticated users. Fixed now.

#4

sanduhrs - July 15, 2008 - 21:07

Thanks, now I found it.

But trying to setup a new server via mail_api, I get some errors:

* warning: mcrypt_generic() [function.mcrypt-generic]: An empty string was passed in /home/[...]/drupal/sites/default/modules/aes/aes.module on line 494.
* warning: mcrypt_generic() [function.mcrypt-generic]: An empty string was passed in /home/[...]/drupal/sites/default/modules/aes/aes.module on line 494.
* user warning: Column count doesn't match value count at row 1 query: INSERT INTO mail_api_servers (protocol, protocol_module, hostname, port, encryption, domain, folder_prefix, hide_folder_prefix, trash_folder, sent_folder, drafts_folder, options, login_suffix, outbox, smtp_primary_hostname, smtp_primary_port, smtp_primary_encryption, smtp_primary_auth, smtp_primary_username, smtp_primary_password, smtp_backup_hostname, smtp_backup_port, smtp_backup_encryption, smtp_backup_auth, smtp_backup_username, smtp_backup_password) VALUES ("", "", "mail.example.org", 143, "None", "example.org", "INBOX.", 0, "Trash", "Sent", "Drafts", "/notls", "@example.org", 0, 0, "0", "", "", "", 0, 0, "0", "", "", "") in /home/[...]/drupal/sites/default/modules/mail_api/mail_api.admin.inc on line 744.

Any idea?

#5

sanduhrs - July 16, 2008 - 08:38

Alright, there are a few things I found out:

  • There's another dependency needed in webmail_plus.info dependencies[] = imapwu_api
  • The files icl.inc and icl_commons.inc from IlohaMail are not included in the package and theres no information given for that.
  • The variables given for the sql-statement in mail_api_add_server_submit are in wrong order and one , "%s" is missing

At the moment I'm stuck on:
?q=webmail_plus/view_folder which gives me warning: Invalid argument supplied for foreach() in /home/[...]/drupal/sites/default/modules/mail_api/mail_api.hooks.inc on line 390.
This is mail_api_mailboxes() that invokes $mailboxes = mail_api_invoke('mailboxes', $pattern);, but $mailboxes is empty, although a server is defined.

#6

xlyz - August 20, 2008 - 23:32

>> The files icl.inc and icl_commons.inc from IlohaMail are not included in the package and theres no information given for that.

see http://drupal.org/node/279980

>> But trying to setup a new server via mail_api, I get some errors

line 717 of mail_api.admin.inc in mail_api module:

add a %s and check the order of auth, username and password for primary and backup smtp

#7

xlyz - August 20, 2008 - 23:53

now I'm stuck.

if I go to /webmail_plus/view_folder

* Unknown function imap_api_mailboxes was called.
* warning: Invalid argument supplied for foreach() in /home/xz/source/drupal-test/sites/all/modules/webmail_plus/webmail_plus.view_folder.inc on line 57.

if I go to /webmail_plus/view_threads

* Unknown function imap_api_overview was called.
* warning: Invalid argument supplied for foreach() in /home/xz/source/drupal-test/sites/all/modules/webmail_plus/webmail_plus.view_threads.inc on line 14.

any hint?

#8

denix - November 15, 2008 - 11:17

Same problem here, functions unknown :(

#9

jeffsoper - November 17, 2008 - 17:30

Same problem. I went to the website and the patch is not available.

#10

scottrigby - December 13, 2008 - 14:52

Hmm, no longer anything available for download from the link in #1: http://www.firmidea.com/webmail-plus/2-0

is this still applicable?

#11

patchak - December 29, 2008 - 21:07

I also need to get this working, is there someone who actually got this to work ??

Patchak

#12

scripthead - January 7, 2009 - 23:26

This should be fixed in the release that's up right now. Please test.

#13

blackdog - January 29, 2009 - 12:42

The original issue here is fixed, but the current release adds many new issues with function names, i.e mail_api_connect is now named (if I understand correctly _webmail_plus_connect, but there are alot of calls to webmail_plus_connect that needs updating.

#14

tirsales - February 19, 2009 - 14:01

Adding

<?php
function webmail_plus_connect( $foo ) {
    return
_webmail_plus_connect($foo);
}
function
webmail_plus_render_subject( $foo ) {
    return
_webmail_plus_render_subject($foo);
}
function
webmail_plus_get_message_tags( $foo ) {
    return
_webmail_plus_get_message_tags($foo);
}
?>

to the top of webmail_thread_plus.inc at least allows viewing of mails ...

#15

tirsales - February 19, 2009 - 14:08

I correct myself. It allows viewing the subjects of emails, the body is still hidden. Folders cannot be selected, emails can not be written (that is: I can reply to an email, but there are no "Send Mail"-Links or anything else on the start screen), etc.
I appologize for the double-post, but editing of comments seems to be broken or disabled.

#16

akayani - March 13, 2009 - 10:38

Here imap_api locks Drupal and I can't see any page until I delete it. Got any clues for me?

Yani

#17

akayani - March 13, 2009 - 12:09

PK sorted out the locking issue it was not understanding that imap was in the mail folder already.

But I've failed to receive emails or get the folders to work. Looks like that is a common issue correct?

Yani

#18

akayani - March 13, 2009 - 15:22

* {mail.handfoto.com:143/notls}INBOX
* {mail.handfoto.com:143/notls}INBOX.Drafts
* {mail.handfoto.com:143/notls}INBOX.Sent
* {mail.handfoto.com:143/notls}INBOX.Trash

I'm down to this error in folders. Back to research mode put my host is Dreamhost if anyone knows a setting for this,

#19

akayani - March 14, 2009 - 13:58

Sorted...not exactly sure how but sorted anyway.

#20

juanito - April 29, 2009 - 02:03

akayani,
After sorting all kind of problem I have everithing working I think but I have this same problem with folders, I didn´t have much time to troubleshoot, so if you can give me any clue it would be helpfull.

#21

akayani - May 5, 2009 - 05:23

My clue would be wait for the boss to issue a new release. If you review the modules he is working on and the statements made I think that is the only conclusion.

Maybe send him a donation for encouragement. ;)

#22

scripthead - May 14, 2009 - 18:46
Assigned to:Anonymous» scripthead
Status:active» fixed

This was fixed in 6.x-1.16

#23

System Message - May 28, 2009 - 18:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.