| View previous topic :: View next topic |
| Author |
Message |
Jeff Swanberg Guest
|
Posted: Fri Jan 14, 2005 7:03 pm Post subject: Replacing From.Text in IdMessage |
|
|
When I send out an email using my SMTP server, the domain name for that
server is being appended to the "From.Text" for my IdMessage component. Is
there a way to block that from happening??
My code is:
with IdMsgSend do
begin
Body.Assign(Memo2.Lines);
From.Text := Edit1.Text;
ReplyTo.EMailAddresses := Edit2.Text;
Recipients.EMailAddresses := Edit3.Text;
end;
The email sends just fine but the "From" box on the recipient's end will
read:
Test ; @swanbergcomputing.com
even though all that is put into the Edit1.Text property is:
Test User
js
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Jan 14, 2005 9:08 pm Post subject: Re: Replacing From.Text in IdMessage |
|
|
"Jeff Swanberg" <jswanberg (AT) swanbergcomputing (DOT) com> wrote
| Quote: | When I send out an email using my SMTP server, the domain name for that
server is being appended to the "From.Text" for my IdMessage component.
|
As well it should, because you are not using the TIdMessage properly to
begin with.
| Quote: | From.Text := Edit1.Text;
snip
all that is put into the Edit1.Text property is:
Test User
|
That is not valid. You must provide an actual email address.
Gambit
|
|
| Back to top |
|
 |
Marcelo Guest
|
Posted: Sat Jan 15, 2005 2:45 pm Post subject: Re: Replacing From.Text in IdMessage |
|
|
did you tried the "replyto" property ?
you not block the "from" email..
but if you want to use a smtp to send and other email that isnīt in the smtp
domain...
some smtp blocks send email from other email that isnīt in their domain...
using
the replyto , you can send email and receive in other domain...
regards
Marcelo
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> escreveu na mensagem
news:41e8344f (AT) newsgroups (DOT) borland.com...
"Jeff Swanberg" <jswanberg (AT) swanbergcomputing (DOT) com> wrote
| Quote: | When I send out an email using my SMTP server, the domain name for that
server is being appended to the "From.Text" for my IdMessage component.
|
As well it should, because you are not using the TIdMessage properly to
begin with.
| Quote: | From.Text := Edit1.Text;
snip
all that is put into the Edit1.Text property is:
Test User
|
That is not valid. You must provide an actual email address.
Gambit
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Jan 15, 2005 11:15 pm Post subject: Re: Replacing From.Text in IdMessage |
|
|
"Marcelo" <mcgal-N-O-S-P-A-M-ig.com.br> wrote
| Quote: | did you tried the "replyto" property ?
|
That won't have any effect. The issue Jeff is seeing is caused by the From
property, because that is the value that the SMTP server is actually told to
send the message from. The ReplyTo address is nothing more than extra data
that is part of the raw message data that gets copied as-is to the
recipients. The SMTP server has to be told who the message is from and who
it is going to BEFORE the actual message data is sent to the server.
| Quote: | you not block the "from" email..
but if you want to use a smtp to send and other email that isnīt
in the smtp domain...
some smtp blocks send email from other email that isnīt in
their domain... using the replyto , you can send email and
receive in other domain...
|
You still have to provide a valid From address regardless of whether you
specify a ReplyTo address. The From address tells the SMTP server which
account within its domain is the account to use for sending the message to
the recipients.
Gambit
|
|
| Back to top |
|
 |
|