public static function generateMessageId( $hostname )
    {
        if ( strpos( $hostname, '@' ) !== false )
        {
            $hostname = strstr( $hostname, '@' );
        }
        else
        {
            $hostname = '@' . $hostname;
        }
        return date( 'YmdGHjs' ) . '.' . getmypid() . '.' . self::$idCounter++ . $hostname;
    }
public static function generateMessageId( $hostname )
    {
        if ( strpos( $hostname, '@' ) !== false )
        {
            $hostname = strstr( $hostname, '@' );
        }
        else
        {
            $hostname = '@' . $hostname;
        }
        return date( 'YmdGHjs' ) . '.' . getmypid() . '.' . self::$idCounter++ . $hostname;
    }
public static function generateMessageId ( $ hostname ) { if ( strpos ( $ hostname , '@' ) !== false ) { $ hostname = strstr ( $ hostname , '@' ) ; } else { $ hostname = '@' . $ hostname ; } return date ( 'YmdGHjs' ) . '.' . getmypid ( ) . '.' . self :: $ idCounter ++ . $ hostname ; }
Returns an unique message ID to be used for a mail message.

The hostname $hostname will be added to the unique ID as required by RFC822.
If an e-mail address is provided instead, the hostname is extracted and used.

The formula to generate the message ID is: [time_and_date].[process_id].[counter]

@param string $hostname
@return string
Returns an unique message ID to be used for a mail message .