XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum -> How To Send User Directly To Ilohamail Inbox

Reply to this topicStart new topic

> How To Send User Directly To Ilohamail Inbox
osward
Posted: Feb 24 2005, 08:55 AM
Quote Post


Newbie
*

Group: Members
Posts: 12
Member No.: 567
Joined: 5-May 03



Hi all,

I am using phpnuke for my site and just switch from uebimiau to IlohaMai and would like to use the data of my users to send them directly to their inbox.

I'm not a programer but for uebimiau I do like

http://mail.osward.net/process.php?f_user=" .$userinfo[username]. "&f_pass=" .$userinfo[user_password2]. "&six=0&";

I would like to do the same with IlohaMail after looking at the source/index.php and found out there is $loginStrings[0] ... etc.

It should be something like http://www.osward.net/webmail/source/index...36;loginStrings[0]... but I don't know exactly how this could be done

I am using the webmail client for pop3 not imap. Can I have a Send and Trash folder in IlohaMail?

Tried with IlohaMail official forum but seems like they are not as active and/or helpful here

Anyone could advise how could I do that

Thanks in advance for the help

Regards,

Osward
PMEmail Poster
Top
atomant
Posted: Feb 24 2005, 04:50 PM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 1776
Member No.: 427
Joined: 18-January 03



You can't have axtra folders in IlohaMail.

About sending user directly to its mailbox - only the first login is sending user to Settings option, after that it allways go to the Inbox. Why do you want to use username/password in the address line instead of normal Login? I don't see the advantage of what you want.


--------------------
Bye,
Sasa



-------------------------------------------------------------------

All electric machines work on smoke...when the smoke escape from machines, they don't work anymore
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming or what?"
PMEmail PosterUsers WebsiteICQ
Top
dien_phan
Posted: Feb 25 2005, 07:46 AM
Quote Post


Member
***

Group: Members
Posts: 62
Member No.: 1493
Joined: 1-February 05



Hi,

By default Ilohamail doesn't create sub folders like Drafts, Sent and Trash as Squirrel Mail (may be Uebimau). I have to add couple of code to do it for users.

Redirecting users to Inbox by keeping login info username/password in the address line is not recommended. php does allow you to post info, simply add some lines of code to post them.
PMEmail PosterUsers Website
Top
osward
Posted: Feb 25 2005, 08:20 AM
Quote Post


Newbie
*

Group: Members
Posts: 12
Member No.: 567
Joined: 5-May 03



Hi,

I want to make a phpnuke module, say, webmail which I did for uebimiau and when members login, he/she can simply click webmail and will send them to their inbox. My users do not need to login again after they login the site. I have other services doing the same and they love the convience. tongue.gif

The code I post
QUOTE
http://mail.osward.net/process.php?f_user=" .$userinfo[username]. "&f_pass=" .$userinfo[user_password2]. "&six=0&";

is what I did in my /modules/webmail/index.php for uebimiau and send the user to his/her inbox.

I need multi language interface for my users in the webmail and IlohaMail seems to have what I need and with DB backend vs flat file in uebimiau.

QUOTE
Redirecting users to Inbox by keeping login info username/password in the address line is not recommended. php does allow you to post info, simply add some lines of code to post them.

OK, I know the risk and please advise how that could be achieved on sending user didrect to their inbox by extracting userid and pass from my phpnuke users table. As I mentioned in my initial post, I am not a programer so I don't understand how to post the info vs sending from the address bar. Would you please post the code here for me? biggrin.gif I know how to get the userid and pass after they login my site and what exactly should be shown in the address line that I don't know.

Please also advise if possible how to add those Draft, Send and Trash for IlohaMail which I perfer stored in a database table instead of flat file.

Thanks in advace for the help

Regards,

Osward
PMEmail Poster
Top
dien_phan
Posted: Feb 27 2005, 07:56 PM
Quote Post


Member
***

Group: Members
Posts: 62
Member No.: 1493
Joined: 1-February 05



Hi,

You can use the following code to post login info:

$fp = fsockopen ($host, 80, $errno, $errstr, 30);
if (!$fp) die("Error: ".$errstr); }
else {
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-Type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-Length: " . strlen($this->PostString) . "\n");
fputs($fp, "User-Agent: Opera 7.54\n");
fputs($fp, "Connection: Close\n\n");
fputs($fp, $data);
while (!feof($fp)) $FileContent .= fgets($fp,128);
fclose($fp);
}
echo $FileContent;

Comment: $host is your host (for example http://mail.osward.net)
$path is path to your script, for example bin/process.php
$data is data to be posted for example: username=someone&password=secret

You can also use cURL extension to php. It is even easier to code:

$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://mail.osward.net/process.php");
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=someone&password=secret');
// grab URL and pass it to the browser
curl_exec($ch);
// close curl resource, and free up system resources
curl_close($ch);

That's all. Hope it's hellful.
PMEmail PosterUsers Website
Top
dien_phan
Posted: Feb 28 2005, 03:51 PM
Quote Post


Member
***

Group: Members
Posts: 62
Member No.: 1493
Joined: 1-February 05



There were two errors in my previous post.
Please use this instead:
1.
$fp = fsockopen ($host, 80, $errno, $errstr, 30);
if (!$fp) die("Error: ".$errstr);
else {
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-Type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-Length: " . strlen($data) . "\n");
fputs($fp, "User-Agent: Opera 7.54\n");
fputs($fp, "Connection: Close\n\n");
fputs($fp, $data);
while (!feof($fp)) $FileContent .= fgets($fp,128);
fclose($fp);
}
echo $FileContent;

2.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://mail.osward.net/process.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"username=someone&password=secret");
curl_exec ($ch);
curl_close ($ch);

You have to install cURL and php cURL extention.
PMEmail PosterUsers Website
Top
hschneider
Posted: Apr 22 2005, 09:34 PM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Osward,

here my hack of source/index.php:

CODE

...
$authenticated = false;

//MOD.start: Search line above and insert this piece of code here
//
session_start();
extract($_SESSION);
$authenticated = true;
$host = '127.0.0.1:110';
$user = $usrid;
$password = $usrpwd;
//
//MOD.end

// session not started yet
if (!isset($session) || (empty($session))){
...


CODE

//MOD Insert this line before //print document head
       $main_page = "main.php?folder=INBOX&user=".$session;

//print document head
include("../conf/HTML_head.inc");


Now just call
index.php?usrid=USERNAME&usrpwd=PASSWORD
with some HTML link. Might require some string encoder/decoder for username and password to hide this sensible data.

Works with Ilohamail 0.8x and 0.9x.


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Webmail Add-ons | Next Newest »

Reply to this topicStart new topic