View Full Version : Using vvMail_Send
anthony.hewitt
01-18-2010, 11:18 AM
Hi,
I'm trying to use the vvMail_Send funciton, and am not having much luck with it. Followed the example but is coming back with a java exception.
Local address contains invalid characters.....
Have tried running the Valence Email Example "Send Email" and this also fails with "sendEmail_err000c(Received a failure response from the server when attempting to send email)"
Has anyone had this problem and/or can provide a solution
Many Thanks
Anthony
richard.milone
01-18-2010, 11:22 AM
Do you know if your SMTP server is set up on the i? This is what actually sends the email, Valence just interfaces to it. If you have other applications outside of Valence that can send emails with no problem then it probably is set up correctly. If not then it probably has never been set up. Let me know this first and then we'll go from there.
anthony.hewitt
01-19-2010, 03:52 AM
Richard, Thanks for your reply. I can confirm that SMTP is set up.
Just to check this i have successfully sent an email using the SNDDST command.
Thanks
Anthony
sean.lanktree
01-19-2010, 05:26 PM
Hi Anthony -
Can you paste the job log of the CGI program running under the Valence20 server instance? It is more than likely the first job with the function "PGM-QZSRCGI".
anthony.hewitt
01-20-2010, 04:42 AM
Have emailed it to you as PDF is too big.
Thanks
Anthony
anthony.hewitt
01-20-2010, 07:30 AM
Hi,
Just found the problem here. I knew it was going to be something silly.
in the vvmail.from i was putting an alias but had not put a space between the end double quote and the open tag.
Thanks
Anthony
sean.lanktree
01-20-2010, 04:15 PM
Thanks for the follow up Anthony, glad to hear you got it going. We should probably test for this condition before attempting to send the email. I will add this as a to-do item for a future release. Can you possibly post the offending code?
anthony.hewitt
01-21-2010, 07:00 AM
From the RPG Toolkit example
// compose a quick simple text email
vvMail.from ='"Ben Smith" <bensmith@acme.com>';
I had
vvMail.from ='"Ben Smith"<bensmith@acme.com>';
note the lack of a space between "Ben Smith" and <bensmith@...
Just one of them silly things i failed to notice :(
Thanks
robert.swanson
01-21-2010, 06:27 PM
Hi Anthony,
FYI, the next release of Valence (version 2.1, due March 1) already includes a fix for this issue. There was also a small bug we discovered in the multiple email address parsing logic -- under certain circumstances the final character of the last email address in the "to" section could be cut off.
-Rob
anthony.hewitt
01-22-2010, 10:10 AM
Hi,
Sorry to start this off again, I have got the vvMail sending now, but i am confused as to why most of my email is not coming through. Reading the examples i should be able to send 30000 chars in the body element. I am only getting roughly 980 chars being emailed.
Any ideas why this is?
robert.swanson
01-22-2010, 10:48 AM
Hi Anthony,
Indeed, you are correct! The java routine that constructs the body string has a 1024 character limitation (so minus some extra characters in the field, that would hit your 980 character limit). We have this fixed now in our version 2.1 release, due out in about 5 weeks. If you need this patch right away on your system, send an email to support and they can arrange to get you an updated version 2.0 mail object.
Sorry for the inconvenience, but thanks for bringing the bug to our attention! Evidently we never tried constructing any large-body emails with that routine before!
-Rob
anthony.hewitt
01-22-2010, 11:56 AM
OK Thanks very much, I have now requested this via the support
Many Thanks
anthony.hewitt
01-28-2010, 09:38 AM
Received and installed new obj as per instructions and all works fine now.
Many Thanks
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.