E
E
Evgeny Orlov2016-12-14 15:32:34
PHP
Evgeny Orlov, 2016-12-14 15:32:34

How to make mailto headers depending on the parameter?

Now I send letters like this send.php
20161214-10v-53kb.jpg
Is it possible to make the From address dependent on the last Referal_ID parameter?
For example, if Referal_ID = 2, then in headers we write From: [email protected],
and if Referal_ID = 3, then in headers we write From: [email protected]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Volf, 2016-12-14
@graf8269

It is possible, for example:

switch($Refereal_ID) {
    case 2:
        $email_from = '[email protected]';
        break;
    case 3:
        $email_from = '[email protected]';
        break;
    default:
        $email_from = '[email protected]';
        break;
}

// ...

$headers = "From: $email_from \r\n";

More or less like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question