Source language: Translate to:

Send Mail using Secure (SSL) account

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Send Mail using Secure (SSL) account

Postby David de Argentina » Tue Oct 14, 2008 10:24 am

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby David de Argentina » Tue Oct 14, 2008 10:38 am

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby smartmedia » Tue Oct 14, 2008 12:09 pm

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...???
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby David de Argentina » Tue Oct 14, 2008 12:26 pm

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby smartmedia » Tue Oct 14, 2008 11:55 pm

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.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Wrangler » Wed Oct 15, 2008 7:58 am

Thanks much, David!
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Neosoft Support » Wed Oct 15, 2008 11:05 am

(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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smartmedia » Fri Oct 17, 2008 9:53 am

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...???
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby David de Argentina » Fri Oct 17, 2008 10:27 am

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby smartmedia » Sat Oct 18, 2008 2:15 am

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...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby David de Argentina » Fri Oct 24, 2008 11:18 pm

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby datadon » Fri Feb 06, 2009 7:15 am

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
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby David de Argentina » Fri Feb 06, 2009 9:42 am

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby datadon » Fri Feb 06, 2009 10:02 am

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!!
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby David de Argentina » Fri Feb 06, 2009 10:11 am

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Next

Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 0 guests