Firefox PHP

Phorummail for Phorum 5

Posted by Brian Moon 
Re: Phorummail for Phorum 5
March 03, 2007 02:10AM
Quote
mmakaay
It might be enough to use a die() statement there. Something like:
if ($user["username"] == "") {
    die("Mail delivery failed, because no username was found in your mail.");
}

Thank you again Maurice. I tried this:

if($user["username"] == ""){
 die("Mail delivery failed: your email did not have a valid username or email address.");
}

It blocks the email from posting, but does not seem to send the expected message. I only get these log entries:

Quote

Mar 2 17:52:31 bstout sm-mta[69837]: l230qUv7069837: from=<aninvalidemail@address.org>, size=1328, class=0, nrcpts=1, msgid=<45E8C6CC.2060506@address.org>, proto=ESMTP, daemon=MTA-v4, relay=mout.perfora.net [217.160.230.41]
Mar 2 17:52:31 bstout sm-mta[69841]: l230qUv7069837: to="|/home/mscis/www/discussion/phorummail.php 1", ctladdr=<mscislist@flfn.org> (26/0), delay=00:00:01, xdelay=00:00:00, mailer=prog, pri=31541, dsn=2.0.0, stat=Sent

Nothing else shows up in the log after this.

Brandon Stout
[mscis.org]
Re: Phorummail for Phorum 5
March 03, 2007 02:36AM
Then some other method is used for telling the mail server what happened. I don't know by what would be needed there instead. I remember getting output from crashed mail scripts from sendmail, so I figured that dumping an error with die() would be enough.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Phorummail for Phorum 5
April 27, 2007 03:42AM
I have updated this code to work with the Phorum 5.2 msgid field.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Attachments:
open | download - phorummail-5.2.tar.gz (3.4 KB)
Re: Phorummail for Phorum 5
May 19, 2007 06:36AM
My first issue was and is repaired as I Use curl to transmit the information, However I believe the smrsh is trimming the the Forum Id.

<snipe>
An SQL-error occured in your phorum-installation.

The error-message was:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
datestamp=1179577071,
thread=0,
parent_id=0' at line 2: Insert into phorum_messages set
forum_id = , Here I don't have a forum ID.
datestamp=1179577071,
thread=0,
parent_id=0,
author='',
<snipe>

I am using sendmail, The method of transit is.
test: "|curl [myaddreess] 29" As of now, I am using this for tesing purpose, another method will be used on a SSL.

My questions, HOW do I check if the problem, is in sendmail or in in phroummail.php? I run the file from prompt, but becasue I have to use the -a flag it dumps errors, with empty information.


Any suggestions?
David



Edited 2 time(s). Last edit at 05/19/2007 10:55AM by scottd@ucann2.org.
Re: Phorummail for Phorum 5
May 19, 2007 11:11AM
I don't think that phorummail works correctly through calling a url / website.
it was simply made for running from the console.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Phorummail for Phorum 5
May 19, 2007 05:43PM
Yeah, I figured that one out, it seems, that when you use curl you need to have [addres%20]forum_id put, when ran with smrsh it returns as
phorum.php forumid file not found.

What I did, is placed the forum files inside a jaled directory on my mail-server, change the database config area to use the current database of the phorum, and placed a sym link to phorummail inside the sm.bin directory, once mime was installed the system works like a chape, I will play the code, to get username verifcations inplace, so anonymous posting CAN NOT be done, this will kick out an email error, stating that they are not a member of (GROUP) you can not post in this area. How to use this phorum with a mail-hub. I am using sendmail.

1. download and install phorum on your web-host (get it working)
2. download and install phorummail. get it to work, with no error. (Mime, etc..)
3. copy the entire phorum directory to your mail server inside a directory
4. modify the /include/db/config.php to use your web-hosted SQL
5. create /var/adm/sm.bin directory
6. create a link to the phorummail to /var/adm/sm.bin/phorummail.php
7. add inside aliases file thenametouse: "|phorummail.php forum_id"

This is what I had to do, and the system works. Verfied, no have to get the emailer out to work, need to DL it.

I am working on this system, so if you have question regarding the sendmail thing, I could try to help. email this system here SandBox@mosimos-systems.com, this post to my Testing Board, I'm working with sendmail.

No to send the POST as an email to users to a group, and accept their reply as a thread-reply.. A workj in progress..



Edited 2 time(s). Last edit at 06/23/2007 10:01PM by scottd@ucann2.org.
Re: Phorummail for Phorum 5
May 19, 2007 05:50PM
Quote

No to send the POST as an email to users to a group, and accept their replys as a thred-reply.. A workj in progress..

I think that works if you use the emailallposts module.
at least if you didn't mean a "phorum group" where the mail should be send to ;).


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Phorummail for Phorum 5
May 19, 2007 05:57PM
I think that works if you use the emailallposts module.
at least if you didn't mean a "phorum group" where the mail should be send to ;).

Actually Here's the setup, and the modules, don't have this at all...

1. send an email to the phorum, using name AT phorumname.TLD
2. Sendmail enters it in the database.
3. Phorum then sees this post, with an adhoc, every 5 minutes or so, for a new message in SAID phorum by way on cron.hourly or crontab
4. Phorum, then sends that post to all group users, and moderators. and change the from email address to that of the mailhub@pohrumname.tld [username or realname poasted]

This is a very complicated matter as sendmail is on another HOST, and doesn't reside on the web server.. so the phorum process, is not actually running when sendmail does it's thing.



Edited 1 time(s). Last edit at 05/19/2007 05:58PM by scottd@ucann2.org.
Re: Phorummail for Phorum 5
May 19, 2007 06:00PM
> 3. Phorum then sees this post, with an adhoc, every 5 minutes or so, for a new message in SAID phorum by way on cron.hourly or crontab

Just add that to the phorummail code so that phorum itself doesn't have to do check for new messages.
but anyway, its up to you how to solve this with that setup.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Phorummail for Phorum 5
May 19, 2007 06:17PM
Ok this is wierd, I starting fooling with the code, adding a forloop thing this this, and now the body has disappeared.
I try to find some sort of error output, but none. The message does post, but there is no body.


Quote

Just add that to the phorummail code so that phorum itself doesn't have to do check for new messages.
but anyway, its up to you how to solve this with that setup.
[/qoute]

I just could create my own headers, and pull the group list from the database and mass email, like

while(grouplist)
{
mail($thisUser, "$this->emailname_phorum", $msg->header);
}

If this is added to the code, how could I add this to have a table inside the admin area
so I could change the model of the email.. From: I CHOICE [username / hidden]

These types, I am still fairly need to php, and don't quit understand the programming method you guys use. So any help here would be greatly appreciate.



Edited 1 time(s). Last edit at 05/19/2007 06:55PM by scottd@ucann2.org.
Sorry, only registered users may post in this forum.

Click here to login