Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
5 registered (Gizmo, Island Piper, luket, 2 invisible), 22 Guests and 24 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 08/02/06
Posts: 39
Top Posters (30 Days)
Ruben Rocha 167
Rick 116
Gizmo 107
Thelockman 63
driv 56
AllenAyres 35
ScriptKeeper 34
Ian 31
Mark S 30
blaaskaak 29
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#104266 - 12/01/00 04:03 PM Altering SMTP email routing for blat usage?
Anonymous
Unregistered


I'm trying to make my UBB send out passwords via email using blat, as my ISP doesn't allow me to relay email through the SMTP server via the ubb. I know it sucks, but I'll have to live with it.

Anyway, what I'm trying to replace the SendEmail sub with is...

[QUOTE]<font face="Verdana, Arial, Helvetica" size="2">
sub SendEmail {
## Uses these variables: $EmailServer, $sendto, $from,
## $subject, and $message

$from = "$BBEmail";


$protocol = getprotobyname('tcp');
socket(SOCKET,PF_INET,SOCK_STREAM,$protocol);
$remote_ip = gethostbyname($EmailServer);
$remote_sock = pack('Sna4x8', AF_INET, 25, $remote_ip);


$blat="blat.exe "$message" -s "$subject" -t "$sendto" -server $EmailServer -f "$from"";
system($blat);

}

</font>[/QUOTE]I'm not too fussed about setting it up for multiple recipients, I just want a quick and dirty way to send out passwords via email. No mass mailings to my users, no UBBFriend or anything, just passwords.

I get no error messages when I use my code(I know it's because I have no error handling routines in there ) but I get no email output. Using the same sub in a script of its own, replacing the variables with fixed data(senders email addy, etC) works fine.

I'm not a perl programmer, I've just been reading through the code and trying to hack it. I know it's probably going in the completely wrong direction, but I really need to make this work and cannot find anything about it at UBBDev.com or ubbhackers.com.

Any help or advice is much appreciated.

Thanks,

Rich

Top
#104267 - 12/01/00 09:15 PM Re: Altering SMTP email routing for blat usage?
Anonymous
Unregistered


When asking a question, be sure to be as specific as you can. Make sure to include:
- The URL to your board
- The version number of your UBB, written as 5.XX(x), as in 5.39c. Currently, the lastest version of UBB is 5.47b.
- Whether you're performing a full/clean installation of UBB or an upgrade.
- The name and URL of your webhost.
- Any error message you receive. Netscape is usually more descriptive in it's error messages than Internet Explorer is, so if possible, try to view the error with Netscape.


are you self hosting?

Top
#104268 - 12/03/00 09:05 AM Re: Altering SMTP email routing for blat usage?
Anonymous
Unregistered


I'm by no means an expert in this field, but wouldn't you need to escape the subject and message?

Just a thought

Top


Moderator:  AllenAyres, Gizmo, Ian, Ron M 
Shout Box

Today's Birthdays
Neptin
Recent Topics
How do I set Moderation Queue for an individual user?
by luket
Today at 11:28 AM
Custom Island per Forum?
by unixpaul
Today at 10:18 AM
SQL Corruption?
by Jason Carey
Today at 05:52 AM
adding views column to portal page
by nick1
Today at 05:12 AM
Upload broken in 7.4.1
by MacW
Today at 03:23 AM
Forum Stats
4247 Members
33 Forums
30483 Topics
154643 Posts

Max Online: 978 @ 06/24/07 08:19 PM