Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » SmtpMail class
Re: SmtpMail class [message #5796 is a reply to message #5785] Mon, 16 October 2006 15:23 Go to previous message
forlano is currently offline  forlano
Messages: 1213
Registered: March 2006
Location: Italy
Senior Contributor
nicomesas wrote on Mon, 16 October 2006 10:08

In order to be able to prove simply you must it open new package, to include package Web and to add the 2 files that there are in zip which I raised yesterday. In order to prove it, simply you must copy the following code.
mail.Host("smtp.YOURSERVER.net")
	.From("FROM@SERVER.COM")
	.Subject("Jelou friend!")
	.To("TO@OTHER.COM")
	.Text("ANY TEXT\nBYE")
	.User("USER")
	.Password("PASSWORD") ;

	if (mail.Send())
		Cout() << "OK\r\n" ;
	else
		Cout() << "BAD\r\n" ;
	Cout() << mail.GetError() << "\r\n" 
	<< mail.GetTranscript() << "\r\n" ;




Hola Nicoooo!

I'm happy to announce to the U++ community that your experiment is a total success. In fact the following code:
#include <Core/Core.h>
#include <Web/Web.h>
#include <winsock.h> 

bool sendMail(String to, String from)
{
  SmtpMailEx mail ;
	
  mail.Host("smtp.tele2.it")
	.From( from )
	.Subject("Jelou friend!")
	.To( to )
	.Text("ANY TEXT\nBYE")
//	.User("xxxxxx")      // I do not need autentication
//	.Password("xxxxx")
 ;

	if (mail.Send())
		Cout() << "OK\r\n" ;
	else
		Cout() << "BAD\r\n" ;
	Cout() << mail.GetError() << "\r\n" << mail.GetTranscript() << "\r\n" ;	
}


CONSOLE_APP_MAIN
{
	sendMail("forlano@fis.unical.it", "luigi.forlano@tin.it" ) ; 
	sendMail("luigi.forlano@tin.it" , "luigi.forlano@tin.it") ;
}

and your previous class smtpEx.cpp + smtpEx.h was able to send email! Just a note. The file Web.h need the inclusion of the line
#include "smtpEx.h"

Quote:

On the other hand, do not try to replace the original class, only I would like to see if it works in Windows to include the new functionalities in the original class.


I wish to see this fix in the official release of our lovely toolkit.

Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: method in separate process
Next Topic: Socket: how to check wether new data arrived? timeout = NULL?
Goto Forum:
  


Current Time: Sat Aug 16 17:30:31 CEST 2025

Total time taken to generate the page: 0.05620 seconds