<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
That is what I have already: here is my smtp2jabber.pl <BR>
<BR>
# Remove the attachment(s) from the message<BR>
my $stripper = Mail::Message::Attachment::Stripper->new($msg);<BR>
my Mail::Message $textonly = $stripper->message;<BR>
my $body = $textonly->body;<BR>
<BR>
# Connect to jabber<BR>
my $jabber = &setup_Jabber(SERVER, PORT, USERNAME, PASSWORD, RESOURCE, "normal/forwarding email");<BR>
<BR>
# Compose the message<BR>
my $jabmsg = Net::Jabber::Message->new();<BR>
<BR>
my $jabmsg->SetMessage(<BR>
"to" => "$rcpt",<BR>
"subject" => "$sender emailed: $subject",<BR>
"body" => "$body");<BR>
<BR>
# And send it<BR>
$jabber->Send($jabmsg);<BR>
<BR>
# Close the connection and exit<BR>
$jabber->Disconnect();<BR>
exit(0);<BR>
<BR>
What part is messed up?<BR>
<BR>
Thanks<BR>
<BR>
On Thu, 2005-12-15 at 23:29 +0200, Norman Rasmussen wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">ahh, had to actually get this working on my dev box. It needs to be:</FONT>
<FONT COLOR="#000000"># Compose the message</FONT>
<FONT COLOR="#000000">my $jabmsg = Net::Jabber::Message->new();</FONT>
<FONT COLOR="#000000">$jabmsg->SetMessage(</FONT>
<FONT COLOR="#000000"> "to" => "$rcpt",</FONT>
<FONT COLOR="#000000"> "subject" => "$sender emailed: $subject",</FONT>
<FONT COLOR="#000000"> "body" => "$body");</FONT>
<FONT COLOR="#000000">I think this would be much cooler with a full smtp transport gateway</FONT>
<FONT COLOR="#000000">idea, but this works for now.</FONT>
<FONT COLOR="#000000">On 12/15/05, Jon Scottorn <<A HREF="mailto:jscottorn@possibilityforge.com">jscottorn@possibilityforge.com</A>> wrote:</FONT>
<FONT COLOR="#000000">> Still get same error</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> here is what shows up in jabber</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> [01:40:20 PM] *** jabbermail is Online [forwarding email]</FONT>
<FONT COLOR="#000000">> [01:40:20 PM] *** jabbermail is Offline</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Don't know if that helps</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">--</FONT>
<FONT COLOR="#000000">- Norman Rasmussen</FONT>
<FONT COLOR="#000000"> - Email: <A HREF="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za</A></FONT>
<FONT COLOR="#000000"> - Home page: <A HREF="http://norman.rasmussen.co.za/">http://norman.rasmussen.co.za/</A></FONT>
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<B><I><FONT SIZE="4"><FONT COLOR="#000080">Jon Scottorn</FONT></FONT></I></B><BR>
<I><FONT COLOR="#000080">Systems Administrator</FONT></I><BR>
<I><FONT COLOR="#000080">The Possibility Forge, Inc.</FONT></I><BR>
<I><FONT COLOR="#000080">http://www.possibilityforge.com</FONT></I><BR>
<I><FONT COLOR="#000080">435.635.0591 x.1004</FONT></I>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>