Page 1 of 2

Send Mail using Secure (SSL) account

PostPosted: Tue Oct 14, 2008 10:24 am
by David de Argentina
Hi All,

I had addapted the VBScript that Dave sent to Alejandro Valenti in order to send mail to an Gmail or another secure mail server.

Now, you can send Gmail e-mails using text or HTML messages, attach one file and select send for a secure or normal server (if you use this function as complete sendmail replacement).

I created a english sample that you can download at:

http://specialapps.software-zone.com/files/NeoGmail.zip

You receive too a script that you must place on your VBScript Functions folder.

If you improve this script, please, post it again..... !

Thanks in advance,

David de Argentina

PostPosted: Tue Oct 14, 2008 10:38 am
by David de Argentina
Observations:

This sample works with Neo 5.6 only.

To do:

* Change the cursor shape (hourglass)
* Add multiple attachments
* recheck HTML capabilities, because I receive some errors with some kinds of html files.
* Add a progress bar (?)
* BC and BCC recipients

Mi devaluated cent,
David de Argentina

PostPosted: Tue Oct 14, 2008 12:09 pm
by smartmedia
Hi...

Very nice, i have test with my gmail account and is working smoothly.
A question. This can work with different mail server besides gmail...???

PostPosted: Tue Oct 14, 2008 12:26 pm
by David de Argentina
Hi Smartmedia,

Yes, this function can work with any smtp server.

The smtp server is passed as parameter.

you must check that the new smtp server works on the port 465, otherwise, you must change the VBScritpt port to the new value.

(sorry, but function allows 9 parameters only... perhaps Dave could change this limitation on a next update...)

My devaluated cent,
David de Argentina

PostPosted: Tue Oct 14, 2008 11:55 pm
by smartmedia
Hi..

Indeed, those parameters must increase.
I don't know anything about vbscript so i can't do much develop futher this script.
I notice that in some point a connection made to a Microsoft server. Is that secure...??? I mean can this be recorded in Microsoft server somewhere by someone and access it...???
Above all is something i was looking for a very long time, thanks again.

PostPosted: Wed Oct 15, 2008 7:58 am
by Wrangler
Thanks much, David!

PostPosted: Wed Oct 15, 2008 11:05 am
by Neosoft Support
(sorry, but function allows 9 parameters only... perhaps Dave could change this limitation on a next update...)


In the mean time, you could try using a global variable for extra info you want to send to the function. You can read the contents of the variable with VBScript.

PostPosted: Fri Oct 17, 2008 9:53 am
by smartmedia
Hi...

I tried to send a message without to use SSL but with no luck.
Also tried to use yahoo account with smtp server but is not sending.
One other think is this:
In the field from a enter a different email and when i send the email the from field has the email i have used in user field... Any idea why...???

PostPosted: Fri Oct 17, 2008 10:27 am
by David de Argentina
Hi Smartmedia,

I tested on @yahoo.com.ar and worked like a charm...

check if your smtp server is correct.

I don't know another reason...

Greetings from Buenos Aires,

David de Argentina

PostPosted: Sat Oct 18, 2008 2:15 am
by smartmedia
Hi...

I read in some forums that if i want to send multiple attachments in a email using this vb script i must enter a line for evey file i send. using this command objMessage.AddAttachment ("[%9]")
The problem is that since you don't know the actual number of files the user will send you can't enter the proper lines. Also if you enter 5 lines for 5 attachments and 1 or more are not filed with the file name, the attachments are not sended at all.
since NB accept only 9 parameters can someone tell me how i will do it...???
Also in this script you can add:
objMessage.CC
objMessage.BCC
objMessage.ReplyTo
but without parameters how...

PostPosted: Fri Oct 24, 2008 11:18 pm
by David de Argentina
Hi Smartmedia,

Is for this reason I asked Dave if VBScript variables are local or global, in order to create some calls with subprocess like set variables...

But VBScript variables are local only.

I think this topic should be moved to the new VBScript & JavaScript section... for later use..

Greetings from Buenos Aires,
David de Argentina

PostPosted: Fri Feb 06, 2009 7:15 am
by datadon
David

There are some limitations on what you can put in the html. I have tried to imclude an image and it does not accept it. A message about "expected end of statement" It seems to give that message when it finds anything it does not want in the html. Remove the bad code and it works fine.

This is the code it will not accept.

Code: Select all
<IMG SRC="http://www.mysite.com/images/pgb.gif" BORDER="0">


Any idea about where to find what is allowed and what is not?

Thanks

PostPosted: Fri Feb 06, 2009 9:42 am
by David de Argentina
Hi Don,

I think CDO is a service to "send" mails... not an e-mail composer

The way you say is the way I use to put body images... and works fine for me...

The another way is create a e-mail composer. For each image you create a block; replace the image for a CID value, encode base-64 the image and add something like this:

Code: Select all
<DIV><IMG alt=3D"" hspace=3D0 =
src=3D"cid:E65895882E394737B6109DE397FB56AF@wxp1"=20
    align=3Dbaseline border=3D0></DIV>


------=_NextPart_000_002F_01C98867.7B00D170
Content-Type: image/gif;
   name="curly.gif"
Content-Transfer-Encoding: base64
Content-ID: <E65895882E394737B6109DE397FB56AF@wxp1>

R0lGODlhSABfAOYBABgsIAQAABgoHBwwJCAwJCAsIPr6+hAkGH19eQgABPb28nVxcYWBgW1taYmJ
iRAICAwICO7q6hgUFCgkJNrW1hQoGI2NkaWqqrKyrjg0NGVpYd7e3r6+viQwJBQUGLa2uhQQEBQk
IJ2dmaGhoXFxbWVlYSAwKGVhWX2BeXl5dQgECCQkHM7OzlBQREREPExEQEA4NBwsKDw4OMrGxlVV
VWFdVVVMUBwYGEA8QDQwLBQQDI2NiUhAPFVVTF1dWUREREBAPBggFCQkIExISCwsMCw0LHFtaRAY
FFlMSIF9eYmJhRQMECwsKBgkIBAgFAgIBJWVlVBMSAwMCGllYe7u7nl1caGhnYWFgaWqoQwgFHVx
aW1xaRgwHObm4nVxeV1hWa6uqm1pcXV5cWllaUxQSKqlpYGBhX19gd7a6qGdlfr69pWVofb2+p2h
mbKusiAwHCA4JExMUK6uspWRmba6snFpXV1dYfb69ubq6lBZTBQkKAAAAAAAAAAAAAAAAAAAACH/

------=_NextPart_000_002F_01C98867.7B00D170--


you said:

Code: Select all
<IMG SRC="http://www.mysite.com/images/pgb.gif" BORDER="0">


Problem is the double quotes: NeoBook "think" this is the argument delimitator. Try replacing all the double quotes with single quotes.

My devaluated cent,
David de Argentina

PostPosted: Fri Feb 06, 2009 10:02 am
by datadon
David

I am not familiar with CDO, but using the single quote solved the problem. I am guessing that will work with other html code that has not worked previously. I will check it out.

Thanks a bunch!!

PostPosted: Fri Feb 06, 2009 10:11 am
by David de Argentina
Hi Don,

You welcome.

I asked Dave if he could add some explanations on the errors generated with the VBScript & Javascript functions, like line number or something more... because it is hard to debug a problematic VBScript or Javascript function...

Greetings from Buenos Aires,
David de Argentina