Recent Topics

1 Jun 01, 2013 15:45    

Hi b2evolution community!

My hosting-provider takes spam seriously and allows scripts to send mails only when they are using a registered e-mail-address. To do this I have to add this registered e-mail-address to the mail()-Funtion as a parameter.

The basic syntax for the PHP mail-funktion should be
mail(to,subject,message,headers,parameters)

I have to change the mail function to this:
mail ($to, $subject, $message, $headers, "-f name@domain.de");

Unfortunately I don't know where I can find the right place in the code of b2evolution to add this parameter.

Can you help me please?

2 Jun 01, 2013 16:38

It's in /inc/_core/_misc.funcs.php

3 Jun 01, 2013 16:51

Wow, thanks for the instant reply!

Is it correct that I have to add the parameter twice in /inc/_core/_misc.funcs.php?


	// SEND MESSAGE:
	if( $debug > 1 )
	{	// We agree to die for debugging...
		if( ! mail( $to, $subject, $message, $headerstring, "-f name@domain.de" ) )
		{
			debug_die( 'Sending mail from «'.htmlspecialchars($from).'» to «'.htmlspecialchars($to).'», Subject «'.htmlspecialchars($subject).'» FAILED.' );
		}
	}
	else
	{	// Soft debugging only....
		if( ! @mail( $to, $subject, $message, $headerstring, "-f name@domain.de" ) )
		{
			$Debuglog->add( 'Sending mail from «'.htmlspecialchars($from).'» to «'.htmlspecialchars($to).'», Subject «'.htmlspecialchars($subject).'» FAILED.', 'error' );
			return false;
		}
	}


Of cause using a real e-mail instead of name@domain.de.


Form is loading...