Use Reply Email for subscription

Submitted by BadIcon on 2016-01-20

I'm using several web forms to generate specific and guided tickets.
But these forms only can send messages from my own address, using my own SMTP server. I can create a "Reply Email" field using the information filled on the form, but can't change the From Email information.
I would use the Reply Email data to create an automatic subscription to the issue, as the From Email can create. Is this possible?

Thank you very much for your great work and for your help.

So you are using the web forms to send emails that are then processed by the email inbox in WebIssues, which turns them into issues, is that correct? How do you pass the "Reply Email" from the form? I think that the only solution is to modify the code of WebIssues to extract the sender's email from the message, not from the "From" header.


Yes, you're right. This is exactly my workflow.
In the font code of one of this email the layer is "Reply-To". I tried to modify the WebIssues code but it don't worked for me.

Now, I found my problem. I should change this on
$result[ 'from' ] = $this->convertAddress( $headers->from[ 0 ] );
to this
$result[ 'from' ] = $this->convertAddress( $headers->reply_to[ 0 ] );

I was writing Reply-To instead reply_to. It's working now, thank you!

I will take advantage of the situation: my form send the messages as html but when WebIssues convert it to plain text all the international vowels appears as html (à, etc.) I tried all the email charset (UTF-8, ISO-8859-1, etc.) but I can do it properly. Any clue?

Thank you very much for your help and for your awesome software!

WebIssues doesn't convert the HTML to text, it just extracts the plain-text version from the email as it is (HTML emails typically contain both a HTML version and a plain-text version).



This is the answer of the form developer:
"Unfortunately Formloom only sends the email as html (not plain text ).
The custom script of WebIssue (?) would need to convert it to plain text."

Do you know if is possible to do that?
I'm looking for it on the net but is a big world to me.

Thanks again!

It's hard to convert HTML to text reliably, that's why WebIssues relies on the sender of the email to do that. However, if your email is HTML only, you might try something like html2text to do the conversion.


The html2text solutions sounds great!
Unfortunately this change is too big to me. My knowledge of PHP is inexistent.
I know I'm abusing of your kindness but if you can help on this you will make me a happy man ;o)

Thank you very much.

I didn't test it, but the simplest solution is to modify the code in cron/job.php near line 466 to something like this:

foreach ( $parts as $part ) {
                            if ( $part[ 'type' ] == 'plain' ) {
                                $text .= $this->inboxEngine->convertToUtf8( $part );
                            } else if ( $part[ 'type' ] == 'html' ) {
                                require_once( 'html2text.php' );
                                $text .= convert_html_to_text( $part[ 'body' ] );

You also need to copy html2text.php and the src subdirectory from the html2text package.