Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

SMTP Session Access

session

  • Please log in to reply
3 replies to this topic

#1 Hunter100

Hunter100

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 292 posts
  • Programming Language:C, C++, PHP, Python, Delphi/Object Pascal, Assembly
  • Learning:Python, Assembly, Bash

Posted 09 December 2010 - 12:29 AM

Hello all,

I want to know if I had a SMTP session-how would I access it and manipulate environment variables using C++?

I want to change the environment variable RCPT to change the destination of the email.

I already have some a SMTP header (from CodeCall) but just wanted to know how to do that.

Thank you.
  • 0

#2 mnirahd

mnirahd

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 328 posts

Posted 09 December 2010 - 03:05 AM

Hi,

You can open connection with your SMTP server, and can send different commands. The purpose of these commands is to set values for

Mail From, Reciepents and Mail contents.

For example, if you want to set a recipient email address, then

1. Open connection with Server
2. Send following string to server, if you want to set xyz@codecall.net as recipient email

RCPT:<xyz@codecall.net>\r\n


I hope this helps!

Munir
  • -1

#3 Hunter100

Hunter100

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 292 posts
  • Programming Language:C, C++, PHP, Python, Delphi/Object Pascal, Assembly
  • Learning:Python, Assembly, Bash

Posted 10 December 2010 - 12:01 AM

Thanks, that great I really needed that cleared up.

So to access the SMTP session, I just connect to the server. But is that server the Mail Submission Agent, or the Mail Transfer Agent?
  • 0

#4 mnirahd

mnirahd

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 328 posts

Posted 10 December 2010 - 01:02 AM

HI,

Yes, you need to connect to SMTP server: which might be called Mail Transfer Agent.

Thanks,

Munir
  • 0





Also tagged with one or more of these keywords: session

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download