Link to home
Start Free TrialLog in
Avatar of mhdi
mhdi

asked on

c# - Relay email directly to smtp server

Hi,

I'm trying to redirect emails into Google Mail without changing the domain names MX records.

In my C# application how do I deliver mail directly to "aspmx.l.google.com" without looking up the actual MX records of the recipient domain name.

Is this possible?
Avatar of ktaczala
ktaczala
Flag of United States of America image

you need to be able to access a SMTP Server such as exchange or gmail,  then use the system.net.mail namespace
Avatar of mhdi
mhdi

ASKER

How do I ask the SMTP server to deliver the emails directly to a server (without looking up the recipient domain MX records)?
You have to setup the system.net.mail credentials

See here for a tutorial:
http://www.rebex.net/support/tutorial/mail-message/default.aspx
ASKER CERTIFIED SOLUTION
Avatar of mhdi
mhdi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mhdi

ASKER

This is the answer I was looking for.