jwSMTP C++ code for sending email / News: Recent posts

jwsmtp version 1.32.15 bugfix

makesmtpmessage now uses strftime to format date string for email headers. sn4k3 suggestion
Bcc no longer added to header. bugfix, Should never have been added to the envelope!

Quick note have not touched the WIN32 code in a few years, also was coded in VC6 so way
out of date. I do not change this code just here for the chance that it will work in windows

Posted by John Wiggins 2007-06-22

jwsmtp version 1.32.13 bugfix

version 1.32.13 Jul 4th 2006
mailer.cpp warning about type hiding mailer::type (changed to typ)
Winfried Mevenkamp pointed out possible buffer overflow after recv calls, fixed by making
all recv calls say the buffer is one shorter than passed e.g.
Recv(len1, s, buff, buffsize -1, 0);
buff[len1] = '\0';
does not overwrite if buffsize characters are received.
Added Closesocket cleanup call if error in dns code line 1113 (also Winfried's suggestion). ... read more

Posted by John Wiggins 2006-07-05

jwSMTP-1.32.12 bugfix

version 1.32.12 Jan 26th 2006
checkRFCcompat() invalidates iterator!
added iterator reassignment to fix, thanks
to Dan Litty & Lideng Ni for the pointer.
Also did not comply fully with rfc 821
section 4.5.2. TRANSPARENCY, fixed.

Posted by John Wiggins 2006-01-27

jwsmtp-1.32.11 bugfix

version 1.32.11 May 15th 2005
On the BSD's will not compile because of the timezone function. Corrected this to use the tm structure tm_gmtoff member instead. See mailer.cpp Line 771

Posted by John Wiggins 2005-05-15

jwsmtp-1.32.10 bugfix

version 1.32.10 May 2005
Forgot to clear the headerline variable in makesmtpmessage (line 894) results in extra attachment artifacts. Thanks Jim Steel for the pointer and fix.

Posted by John Wiggins 2005-05-12

jwsmtp-1.32.9 BugFix

version 1.32.9 April 2005
When attaching files with filename less than 4 characters causes terminate call as substr is overrun, big oopsy. Can now attach files of 1 character and up, as it should be, wow what an idiot

Posted by John Wiggins 2005-04-17

jwsmtp-1.32.8 Optimize/Bugfix

Added a bugfix for timezone
Optimized for large attachments
please see Changelog file


Posted by John Wiggins 2005-03-20

jwsmtp-1.32.7 (minor bug fix)

version 1.32.7 March 2005
Minor bug fix.
line 815 of mailer.cpp missing else clause
(bug found by Thomas Pflger, Thanks)
This did not upset the logic, just halted its processing.
Essentially two if/else blocks were present instead of one.

Posted by John Wiggins 2005-03-04

version 1.32.6 Minor bug fix.

version 1.32.6 February 2005 Minor bug fix.
parseaddress has a minor bug, cuts off the end of a name outside of <> characters if the name is at the beginning of the address i.e. "hoopla girl<hoopla@wibble.com>"
ends up: "hoopla gir"
If your intersted see line 1237 of mailer.cpp for explanation
(bug found by David Irwin, thanks David)

Posted by John Wiggins 2005-02-27

version 1.32.5 Minor bug fixes.

Replaced checklinesarelessthan1000chars with checkRFCcompat
this function now also checks for invalid line breaks and fixes them up.
qmail will no longer balk with ....Lame Server... issues.
If a dot is in the message on a line by itself another dot is added to
that line to stop premature message closing
(suggestion by David Irwin, thanks David).

Posted by John Wiggins 2004-10-15

version 1.32.4 minor bugfix

version 1.32.4 August 2004
Minor bug fix.
Default mailer constructor does not set the authentication variables. This causes errors when not using authentication when using the default constructor.
stupid error on my part, sorry.

Posted by John Wiggins 2004-08-21

version 1.32 release

HTML formatted mail now possible via new functions:

insert via file, string or vector.

Posted by John Wiggins 2004-06-20

version 1.31.1 release

Minor bug fix
Last release was missing VC specific files, sorry added now. Thanks to Bernard Garros for pointing this out.

Posted by John Wiggins 2004-05-09

version 1.31 release

Added Authentication support (LOGIN PLAIN only)
jwsmtp now under GNUtools support
i.e. ./configure;make;make install

Posted by John Wiggins 2004-04-10

Version 1.30 release

version 1.30
Now under the GNU GPL license
makefile changes to make a library also
e.g. make lib libinstall
link dynamic -ljwsmtp or static /usr/local/lib/libjwsmtp.a
added compatabilty code and moved most platform specifics from the mailer class
removed bugs (send/recv returns not checked correctly in old code)
removed errant MSG_DONTROUTE flags from network code. Fixes the case where
no network errors are encountered when not using a local nameserver.
added a sockaddr_in wrapper, life is easier for me now.
everything is in the jwsmtp namespace, need to do this now jwsmtp::mailer(...)
added default constructor
added second demo program, the shortest usage of the mailer class.

Posted by John Wiggins 2003-07-17

Version 1.21 source code release

version 1.21
added names in email address functionality.
e.g. can now use:
"foo bar <foo@bar.com>"; or
"<foo@bar.com> foo bar" or
for sender & recipient addresses.
Incorporated suggestions by Ken Weinert to resolve SunOS issues.
INTERFACE unchanged.

Posted by John Wiggins 2003-02-10

CVS updated to version 1.21

version 1.21
added real email address functionality.
i.e can now use:
"foo bar <foo@bar.com>" or
"<foo@bar.com> foo bar" or
for sender & recipient addresses.
Incorporated suggestions by Ken Weinert to resolve SunOS issues.
INTERFACE unchanged.

Posted by John Wiggins 2003-02-09

CVS repository created

Initial cvs repository created, beginning at V1.18 of the code base.
to check out lastest code:
cvs -z8 -d:pserver:anonymous@cvs.jwsmtp.sourceforge.net:/cvsroot/jwsmtp co jwsmtp

Posted by John Wiggins 2002-05-05

Support, Bug postings requests enabled

Bug & Support requests can now be posted
Sorry, neglected to turn this on.
Problems email: jwsmtp@johnwiggins.net

Posted by John Wiggins 2002-05-04

jwSMTP Attachment bug fix, new set functions V1.18

version 1.18
bug fix, attachments did not work for binary files as
lines were longer than a 1000 characters, SMTP forbids
this, base64encode function now adds a newline every 79
chars into a line. Sorry stupid oversight on my part.

Added funtions to change all the values in the mail
message, recipients, servers etc..

new functions:
bool setserver(const std::string& nameserver_or_smtpserver);
bool setsender(const std::string& newsender);
void clearattachments();
void reset(); // erase recipients, message, attachments, errors.... read more

Posted by John Wiggins 2002-05-01

jwSMTP Version 1.17, carbon copy, blind carbon copy added

version 1.17
TO: Cc: Bcc: mail recipient capability added
added a function to remove attachments.
changed addrecipient, interface compatible with old function.
as the extra argument has a default value
i.e. addrecipient("someone@somewhere.net");
is the same as:
addrecipient("someone@somewhere.net", mailer::TO);

new functions:
bool mailer::removeattachment(const std::string& filename);
changed functions
bool addrecipient(const std::string& newrecipient, short recipient_type = TO /*CC, BCC*/);

Posted by John Wiggins 2002-04-30

jwsmtp Version 1.16, file attachments added

Can now send attachments with the mail.

one new function added to the interface
attach(const std::string& filename);

Posted by John Wiggins 2002-04-27

Version 1.15 release, subject &amp; message change ability added

Added New Demo Program

Added setmessage & setsubject functions
mail can now be changed after construction

Posted by John Wiggins 2002-04-21

multiple recipients capabaility added

Added three functions to facilitate sending to multiple email addresses.

Posted by John Wiggins 2002-04-20

getserveraddress update

fixed segfault on linux.
error in mailer::getserveraddress
line 289 read in version 1.12:
return toaddress.substr(pos, server.length()- pos);
should read:
return toaddress.substr(pos, toaddress.length()- pos);

Posted by John Wiggins 2002-04-14

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks