SMTP mail client C++


 
Thread Tools Search this Thread
Top Forums Programming SMTP mail client C++
# 1  
Old 03-29-2009
SMTP mail client C++

Hey Guys,
I am writing an SMTP mail client in c++ in unix and it needs to do the following:
  • I need to create a client
  • the client talks to port 25
  • it sends a hello world message
  • I also need to support and smtpclient class and a clientdriver class
I have written the smtpclient class, but I am drawing blanks on the rest. I am going to include the smtpclient class below ,but I was hoping for some pointers or help on the rest of the program.

Class smtpclient (

public String smtpClient (String machineName, int portNumber);
public String login (String userName, String password);
public void logout ():
public String senderAndReceiver (String sender, String receiver);
public String messageBodyPrefix (String message);
public String messageSuffix (String message);
# 2  
Old 03-30-2009
If you've already written the class for this, points 1 and 2 should already be checked off. Point 3 should only be a simple sequence of new -> login -> senderAndReceiver -> messageBodyPrefix -> messageSuffix -> logout
Although, and please correct me if I'm wrong, but you seem to have methods for the message prefix (does that mean the header?) and the suffix (common signature for all mails?), but which method transfers the content itself?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Shell Programming and Scripting

Perl: Send mail via SMTP

I have a existing perl program , in this program it will output a email address list to a variable ( $email_list ) , mail content to a variable ( $email_content ) , if I want to send all email to these email address with corresponding content , would aadivse how to write a perl script ? thanks (2 Replies)
Discussion started by: ust3
2 Replies

3. Shell Programming and Scripting

Getting error while sending mail via smtp

Hi All, I used before a simple routine code in tcl to send mail. package require smtp package require mime package require Tcl proc send_simple_message {recipient email_server subject body} { set token mime::setheader $token Subject $subject smtp::sendmessage $token \ ... (0 Replies)
Discussion started by: zivsegal
0 Replies

4. Programming

Send mail via SMTP

If anybody has a c/c++ code of send mail via smtp with or without authorization for Linux, I will be very grateful. Thank's. (0 Replies)
Discussion started by: LuckyStr
0 Replies

5. Windows & DOS: Issues & Discussions

Send mail using SMTP

Hi I need to send email from batch script, using SMTP from my exchange server. Can any one send me command line of that should be non interactive. I did using MAPISEND, but i should not use it for some reasons. I have to send this using SMTP for Microsoft Exchange Server. mapisend -u... (2 Replies)
Discussion started by: mohantmk
2 Replies

6. Programming

Help needed for C++ SMTP Client

Hi, may i know how do i take in user inputs and set them for "Subject", "To" and "From"? === my code: write(sockfd,"DATA\r\n",strlen("DATA\r\n")); strcpy (msgToSvr, ""); cin.getline(body, 99, '\n'); strcat (msgToSvr, subject); strcat (msgToSvr, "\r\n"); ... (1 Reply)
Discussion started by: blurboy
1 Replies

7. UNIX for Dummies Questions & Answers

sending mail via smtp

Hi Gururs, I have a process on a middelware (SAP XI) that is runnung on HP-UX. This Process is creating a flatfile. Now I want to call a script within the process that sends the created flatfile as attachment via Mail using a smpt-server. The script should have the following input parameters:... (2 Replies)
Discussion started by: elko.hasse
2 Replies

8. IP Networking

SMTP mail

I want to send e-mail from my yahoo account. But mail -s "title" *@yahoo.com < line.txt is from my local address to *@yahoo.com. How can i do this? (1 Reply)
Discussion started by: Euler04
1 Replies

9. UNIX for Dummies Questions & Answers

e-mail client supporting HTTP mail servers

Hi all I want to know, is there any e-mail client in linux which supports HTTP mail servers. i am using fedora2. as far as investigated or tried I only find POP or IMAP mail server configuration in mozilla mail, ximian and there were no option such as HTTP. I can easily see my e-mail while i am... (0 Replies)
Discussion started by: babayeve
0 Replies

10. UNIX for Advanced & Expert Users

SMTP going to Junk Mail

Hi All I have a slight problem with sending mails from my server - if I send mails to Yahoo! or Hotmail, either direct via the SMTP server, or through sendmail, the email ends up in the account holder's Junk Mail folder. Is something in the headers causing these emails to be treated as junk?... (3 Replies)
Discussion started by: saabir
3 Replies
Login or Register to Ask a Question