e-mail forwarding

Do you have suggestions how to improve myLounge Redirection? Want to give a feedback? Or even found a bug? Then please post in here.

Moderator: Scooby

e-mail forwarding

Postby JGJacobs » Sat Jul 03, 2004 4:58 pm

I realised that sometime last year you were planning to add e-mail redirection to add e-mail redirection to the redirection script. I was just wondering what happened to that idea?
HazardCell.com
Anything's Possible
JGJacobs
Enthusiast
Enthusiast
 
Posts: 78
Joined: Fri Apr 02, 2004 10:17 am
Location: Kajang, Malaysia, Asia

Postby andelal » Mon Jul 12, 2004 5:29 pm

Too much work...much too much work... :oops:

Alex
User avatar
andelal
Site Admin
Site Admin
 
Posts: 479
Joined: Tue Jan 07, 2003 8:53 pm
Location: Vienna/Austria/Europe

Postby JGJacobs » Wed Jul 14, 2004 2:04 pm

ooohhhhhh.....ic

any idea when your next script is coming up?(if you're planning to write one, that is) :?:
HazardCell.com
Anything's Possible
JGJacobs
Enthusiast
Enthusiast
 
Posts: 78
Joined: Fri Apr 02, 2004 10:17 am
Location: Kajang, Malaysia, Asia

Postby andelal » Wed Jul 14, 2004 5:36 pm

Yes, I think in winter. But probably it won't be public.

Alex
User avatar
andelal
Site Admin
Site Admin
 
Posts: 479
Joined: Tue Jan 07, 2003 8:53 pm
Location: Vienna/Austria/Europe

Postby JGJacobs » Sat Jul 17, 2004 6:50 am

OK
HazardCell.com
Anything's Possible
JGJacobs
Enthusiast
Enthusiast
 
Posts: 78
Joined: Fri Apr 02, 2004 10:17 am
Location: Kajang, Malaysia, Asia

Postby JGJacobs » Sat Jul 17, 2004 6:50 am

Have you taken care of the ShortLink problem?
HazardCell.com
Anything's Possible
JGJacobs
Enthusiast
Enthusiast
 
Posts: 78
Joined: Fri Apr 02, 2004 10:17 am
Location: Kajang, Malaysia, Asia

Postby andelal » Sat Jul 17, 2004 7:17 am

Mh yes, but I didn't get any response so far.

Alex
User avatar
andelal
Site Admin
Site Admin
 
Posts: 479
Joined: Tue Jan 07, 2003 8:53 pm
Location: Vienna/Austria/Europe

Postby JGJacobs » Mon Jul 19, 2004 12:49 pm

OK
HazardCell.com
Anything's Possible
JGJacobs
Enthusiast
Enthusiast
 
Posts: 78
Joined: Fri Apr 02, 2004 10:17 am
Location: Kajang, Malaysia, Asia

Postby www.hm/yourname.com! » Fri Jul 30, 2004 12:52 pm

email is a touchy subject i think. if it were to be implemented I'd think twice about using the script. there is so much email abuse these days I dont think its worth offering.
www.hm/yourname.com!
 

Postby JGJacobs » Sat Jul 31, 2004 11:28 am

i understand emails causing problems but how much problems could email forwarding cost?
HazardCell.com
Anything's Possible
JGJacobs
Enthusiast
Enthusiast
 
Posts: 78
Joined: Fri Apr 02, 2004 10:17 am
Location: Kajang, Malaysia, Asia

Postby AvisSoftware » Thu Feb 24, 2005 8:09 pm

I'd like to see email forwading feature too...it would be so cooool! :) And regarding the spam / abuse.....options should be provided in admin to control this for eg:

can only send x number of messages in a min/hour or whatever.
or something like this.

Thanks!
AvisSoftware
Newbie
Newbie
 
Posts: 3
Joined: Thu Feb 24, 2005 7:45 pm

Postby z0e » Sun Mar 20, 2005 11:18 pm

Hi,

I've integrated email forwarding in mylounge.

It work with Sendmail, and I run a cron who get email in mysql and with the "exec" function of php you can (re)create the aliases.db and other files that need to be modified. And then make SH script to restart sendmail all hour ;)

My redirection site is finished. I think i put it online in20-25 april.

Wait ...

( offer >> 5 forwarding email and redirection )

by
z0e
 

Postby Guest » Tue May 24, 2005 11:40 pm

hi,

My site is now online ;)

>> http://www.tribue.info

5 email redirection and 1 http redirection, all for FREE with no ADS !
Guest
 

Go for the optional email FDWing Please

Postby webbiz » Thu Feb 23, 2006 4:02 am

I also would be very keen to have email FWDing as a switchable option. I almost succeeded in writing a script for it but had trouble with HTML (never done anything like this before). The script got the number of emails from the inbox; found the corresponding forwarding address from MySQL; if there was no matching address it substituted an address to a separate account; send the email (text was good but the HTML lost it’s formatting); deleted the email from the inbox; restart loop; checked for the next email; if no more mail the script would sleep for user set period.

I was going to use cron but ended adding the user defined sleep period. Mine actually used refresh to create the loop effect as well which reduced the chance of getting hung up for ever on an error but as I said I’m new to this.

Anyway, that much didn’t take real long and I’ve seen there are some scripts available for FWDing email. Have pasted one below which may be of some help. I haven’t tried it just found it on www.pscode.com last night. Again I think optional email FDWing would be GREAT that will make a very good product even better. :lol:

//
// Name: A POP3 and SMTP email class usi
// ng sockets.
// Description:This is an email class th
// at will let you check your email, delete
// email from server, and send email withou
// t any built-in commands such as mail() a
// nd other imap functions.
// By: Jon Anders
//
// Assumes:When testing the example code
// at the bottom, remove the /* and */ comm
// ents to enable whichever section.
//
//This code is copyrighted and has // limited warranties.Please see http://
// www.Planet-Source-Code.com/vb/scripts/Sh
// owCode.asp?txtCodeId=1469&lngWId=8 //for details. //**************************************
//

<?php
/* A POP3 and SMTP email class using sockets. An exerpt from phpMailIt WebMail Client.
By: Jonathan Anders
Website: http://www.datalogik.org
Email: datalogik@datalogik.org */
set_time_limit(0);
class phpMailIt
{
// Private variables
var $_serv;
var $_port;
var $_usern;
var $_pass;
var $_to;
var $_subj;
var $_body;
var $_socket;
// Toggle this if you want to see what the script does in the background, it will screw up the look of the webmail though.
var $_debug = 1;
// Do not edit these. These are here to identify the mailing program.
var $_app_name = 'phpMailIt';
var $_app_desc = 'Web E-Mail';
var $_app_ver = '1.0';
// POP Functions
function pop3_init ($server, $port, $username, $password)
{
// Specify variables, obviously.
$this->_serv = $server;
$this->_port = (int)$port;
$this->_usern = $username;
$this->_pass = $password;
}
function pop3_connect ()
{
// Check to see if the hostname was given.
if ($this->_serv == "")
$this->mail_output("Hostname was not specified.");
// Check for debuggy thingy, theres loads of these.
if ($this->_debug)
$this->mail_output("Connecting to ".$this->_serv." ...");
// Create the socket on whatever port is specified.
$this->_socket = fsockopen($this->_serv,$this->_port);
}
function pop3_login ()
{
// Retrieve data from the server, not getting mail yet.
$_mail_get = $this->mail_get();
// Send the 'USER' command to authenticate with the POP3 server.
if ($this->mail_write("USER $this->_usern") == 0)
return("Could not send the USER command");
// Again, retrieving data from server.
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
// Split the data into parameters
$parse = explode(" ", $_mail_get);
// Problems with the 'USER' command have occured.
if ($parse[0] != "+OK")
return("User error: authentication with USER command.");
// Send the 'PASS' command to authenticate with the POP3 server, last of 2 parts.
if ($this->mail_write("PASS $this->_pass") == 0)
return("Could not send the PASS command");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
$parse = explode(" ", $_mail_get);
if ($parse[0] != "+OK")
return("User error: authentication with PASS command.");
}
function pop3_check_messages()
{
// Send the 'STAT' command to check for new messages
if ($this->mail_write("STAT") == 0)
return("Could not send the STAT command");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
$parse = explode(" ", $_mail_get);
if ($parse[0] != "+OK")
return("Error: issues with STAT.");
if ($this->_debug)
$this->mail_output($parse[1]);
if ($parse[1] == 0)
if ($this->_debug)
$this->mail_output("No new mail");
// For loop, retrieving however many messages from the server.
for ($x = 1; $x <= $parse[1]; $x++)
{
// Null the values
$pop3_from[$x] = "";
$pop3_to[$x] = "";
$pop3_subject[$x] = "";
$pop3_date[$x] = "";
$pop3_received[$x] = "";
$pop3_xmailer[$x] = "";
$pop3_body[$x] = "";
// Send the 'RETR' command.
if ($this->mail_write("RETR $x") == 0)
return("Could not send the RETR command");

// While loop, make sure it downloads the entire email content.
while (($_mail_get = $this->mail_get()) != ".")
{
if ($this->_debug)
$this->mail_output($_mail_get);
$_mail_get_parse = explode(" ", $_mail_get);
// This was chosen to format the data so it can be read by the user.
switch (strtolower($_mail_get_parse[0]))
{
case "from:":
$pop3_from[$x] = $_mail_get_parse[1];
break;
case "to:":
$pop3_to[$x] = substr($_mail_get,3,strlen($_mail_get)-3);
break;
case "subject:":
$pop3_subject[$x] = substr($_mail_get,8,strlen($_mail_get)-8);
break;
case "date:":
$pop3_date[$x] = substr($_mail_get,5,strlen($_mail_get)-5);
break;
case "received:":
$pop3_received[$x] = substr($_mail_get,9,strlen($_mail_get)-9);
break;
case "x-mailer:":
$pop3_xmailer[$x] = substr($_mail_get,9,strlen($_mail_get)-9);
break;
case "+ok":
break;
default:
$pop3_body[$x] .= $_mail_get . "\n\r";
}
}
// The output of the emails.
if ($this->_debug)
{
$this->mail_output("To: ". $pop3_to[$x]);
$this->mail_output("From: ". $pop3_from[$x]);
$this->mail_output("Subject: ". $pop3_subject[$x]);
$this->mail_output("Date: ". $pop3_date[$x]);
$this->mail_output("Received: ". $pop3_received[$x]);
$this->mail_output("X-Mailer: ". $pop3_xmailer[$x]);
$this->mail_output("Body: <PRE>". $pop3_body[$x] . "</PRE>");
$this->mail_output("<br><br><br><b>LINE BREAK</b><br><br><br>");
}
}
}
function pop3_delete_messages ($message_numbers)
{
for ($x = 0; $message_numbers[$x]; $x++)
{
// Send the 'DELE' command.
if ($this->mail_write("DELE $message_numbers[$x]") == 0)
return("Could not send the DELE command");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
}
}
// SMTP Functions
function smtp_init ($server, $port)
{
// Specify variables, obviously, not many here.
$this->_serv = $server;
$this->_port = (int)$port;
}
function smtp_connect ()
{
// Check to see if the hostname was given.
if ($this->_serv == "")
$this->mail_output("Hostname was not specified.");
// Check for debuggy thingy, theres loads of these.
if ($this->_debug)
$this->mail_output("Connecting to ".$this->_serv." ...");
// Create the socket on whatever port is specified.
$this->_socket = fsockopen($this->_serv,$this->_port);
// Tell the script to login.
//$this->smtp_send_email ($this->_to, $this->_subj, $this->_body);
}
function smtp_hand_shake ()
{
// Send the 'HELO' command to the server to let them know we mean business.
$helo = 'HELO $' . 'host';
if ($this->mail_write($helo) == 0)
return("Could not send the HELO command");
// Again, retrieving data from server.
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
// Split the data into parameters
$parse = explode(" ", $_mail_get);
// Problems with the 'HELO' command have occured.
if (($parse[0] != "250") or ($parse[0] != "220"))
return ("Could not continue with hand shake");
}
function smtp_send_email ($from, $to, $subject, $body)
{
// Start compiling the email.
if ($this->mail_write("MAIL FROM: $from") == 0)
return("Could not send the MAIL FROM command");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
$parse = explode(" ", $_mail_get);
if ($parse[0] != "250")
return("User error: problems with sending email.");
if ($this->mail_write("RCPT TO: $to") == 0)
return("Could not send the RCPT command");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
$parse = explode(" ", $_mail_get);
if ($parse[0] != "250")
return("User error: problems with sending email.");
if ($data_already_sent == 0)
if ($this->mail_write("DATA") == 0)
return("Could not send the DATA command");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
$parse = explode(" ", $_mail_get);
if (($parse[0] == "250") or ($parse[0] == "220") or ($parse[0] == "354"))
{
$this->mail_write("X-Mailer: $this->_app_name - $this->_app_desc Version: $this->_app_ver");
$this->mail_write("FROM: $from");
$this->mail_write("TO: $to");
$this->mail_write("Subject: $subject");
$this->mail_write("$body");
$this->mail_write(".");
}
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
$data_already_sent = 1;
}
// Misc Functions
function mail_output ($print)
{
echo "$print<p>\n";
return;
}
function mail_quit ()
{
$this->mail_write("QUIT");
$_mail_get = $this->mail_get();
if ($this->_debug)
$this->mail_output($_mail_get);
}
function mail_write ($data)
{
if ($this->_debug)
$this->mail_output ($data);
// Sending stuff to the server right here.
return(fputs ($this->_socket, $data . "\r\n"));
}
function mail_get($socket)
{
// Retrieving stuff from the server for the first 100 bytes.
for ($line="";;)
{
if (feof($this->_socket))
return(0);
$line .= fgets($this->_socket,100);
$length = strlen($line);
if (($length >= 2) && (substr($line,$length-2,2) == "\r\n"))
{
$line = substr($line,0,$length-2);
return($line);
}
}
}
}
//Check Email (to use this the /* and */ comments)
/*
// Create a new mail object.
$array[0] = new phpMailIt;
// Send the pop3_init command with the server, port, username, and password.
$array[0]->pop3_init ("localhost", 110, "username", "password");
// Send the pop3_connect command to have the script connect to the server.
$array[0]->pop3_connect ();
// Logging into the server, sending the USER and PASS commands.
$array[0]->pop3_login ();
// Check for new messages.
$array[0]->pop3_check_messages ();
// Tell the script to disconnect.
$array[0]->mail_quit ();
*/
//Send Email (to use this the /* and */ comments)

// Create a new mail object.
$array[0] = new phpMailIt;
// Send the smtp_init command with the server and port.
$array[0]->smtp_init ("localhost", 25);
// Send the smtp_connect command to have the script connect to the server.
$array[0]->smtp_connect ();
// Tell the server that you wish to send an email and wait for a response.
$array[0]->smtp_hand_shake ();
// Send all of the needed commands to send an email.
$array[0]->smtp_send_email ("email@from.adddress.com", "email@to.address.com", "Subject here", "Body of email here");
// Tell the script to disconnect.
$array[0]->mail_quit ();

//Delete Email Message (to use this the /* and */ comments)
/*
// Provide an array of messages that you want deleted by number. eg: you want messages 1, 4, 5, and 8 deleted.
$test = array('1','4', '5', '8');
// Create a new mail object.
$array[0] = new phpMailIt;
// Send the pop3_init command with the server, port, username, and password.
$array[0]->pop3_init ("localhost", 110, "username", "password");
// Send the pop3_connect command to have the script connect to the server.
$array[0]->pop3_connect ();
// Logging into the server, sending the USER and PASS commands.
$array[0]->pop3_login ();
// Tell the server to delete all of the message numbers in the array() that was provided.
$array[0]->pop3_delete_messages ($test);
// Tell the script to disconnect.
$array[0]->mail_quit ();
*/
?>
webbiz
Newbie
Newbie
 
Posts: 6
Joined: Mon Feb 20, 2006 8:10 am

Postby Nitek » Thu Feb 23, 2006 10:34 am

eMail redirection should be no problem, if you got your own server (not just a hosting account). You can configure the mailserver for using a sql-table directly as aliasdb. Its the same way most web-administration panels work. No need for heavy scripts for that.
Nitek
Newbie
Newbie
 
Posts: 3
Joined: Wed Feb 22, 2006 10:29 am

Next

Return to Suggestions

Who is online

Users browsing this forum: No registered users and 4 guests

cron