Liberty BASIC Community Forum
« Send email, with optional attachments. »

Welcome Guest. Please Login or Register.
Nov 17th, 2017, 8:51pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Send email, with optional attachments.  (Read 2420 times)
stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Send email, with optional attachments.
« Reply #4 on: Nov 1st, 2009, 12:07pm »

* So I downloaded sendEmail-v156
* I copied alyce example program
* I changed it to my gmailaddress and password
* changed the paths
* I even tried 465 instead of 587

It doesn't work.

Can someone help me? Need more info?



Stefan Hesseling

User IP Logged

http://www.soundofanimals.com
http://sincosin.com
Alyce Watson
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 14917
xx Re: Send email, with optional attachments.
« Reply #5 on: Nov 1st, 2009, 1:12pm »

on Nov 1st, 2009, 12:07pm, stefanhes wrote:
* So I downloaded sendEmail-v156
* I copied alyce example program
* I changed it to my gmailaddress and password
* changed the paths
* I even tried 465 instead of 587

It doesn't work.

Can someone help me? Need more info?



Stefan Hesseling



Do you have copies of both files in the program folder?



Quote:
'requires sendemail.exe and sendemail.pl

User IP Logged

Alyce
Liberty BASIC Workshop - a complete IDE for Liberty BASIC


Alyce's Restaurant
for Liberty BASIC code, tools and references
stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Send email, with optional attachments.
« Reply #6 on: Nov 1st, 2009, 1:29pm »

I even made two copies of sendemail.exe and sendemail.pl in the same folder as the .bas folder

no effect (even no error-message)

Here is my code (except for the password, ;-)

Code:

'Example to send email using gmail.
'For other services, see their documentation

'requires sendemail.exe and sendemail.pl

from$ = "rietveldlyceumbrief@gmail.com"
mailuser$ ="rietveldlyceumbrief@gmail.com"
recipient$ ="sjmhesseling@hotmail.com"
server$ = "smtp.gmail.com:587"           '465 of 587
mailpwd$ = "********"
subject$ = "Is dit de titel van het onderwerp"
message$ = "Hallo wereld."
attach$ = "C:\Documents and Settings\Eigenaar\Mijn documenten\Mijn teksten\arbaclassic.txt"

cmd$ = " -f ";from$;" -t ";recipient$;" -s ";server$;" -xu ";mailuser$;" -xp ";mailpwd$;" -u ";subject$;" -m ";message$;" -a ";attach$

run "C:\Documents and Settings\Eigenaar\Mijn documenten\Downloads\sendEmail-v156\"+"sendemail.exe ";cmd$ , HIDE

end


 
« Last Edit: Nov 1st, 2009, 1:30pm by stefanhes » User IP Logged

http://www.soundofanimals.com
http://sincosin.com
stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Send email, with optional attachments.
« Reply #7 on: Nov 2nd, 2009, 10:30am »

Anyone got this working?

Shall I make a new gmail account, make even the password public and can someone send an email with the little program above?
User IP Logged

http://www.soundofanimals.com
http://sincosin.com
Stefan Pendl
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Computers are like babies, you must teach them what you like them to do ...


Homepage PM

Gender: Male
Posts: 5297
xx Re: Send email, with optional attachments.
« Reply #8 on: Nov 2nd, 2009, 3:02pm »

Have you already tried the -l switch to create a log file?

Is the port open for sendEmail by the firewall?

Do you use the TLS enabled windows version?
« Last Edit: Nov 2nd, 2009, 3:03pm by Stefan Pendl » User IP Logged

Stefan

Make sure to read and follow the Forum Guidelines

Liberty BASIC Pro 4.04, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Send email, with optional attachments.
« Reply #9 on: Nov 2nd, 2009, 4:43pm »

Thank you Stefan!!

I made a logfile.

I saw the problem!!

It was the old MS_DOS not liking spaces in the path name...


Problem solved

thank you again to point me to the right direction.
User IP Logged

http://www.soundofanimals.com
http://sincosin.com
Stefan Pendl
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Computers are like babies, you must teach them what you like them to do ...


Homepage PM

Gender: Male
Posts: 5297
xx Re: Send email, with optional attachments.
« Reply #10 on: Nov 3rd, 2009, 12:46am »

on Nov 2nd, 2009, 4:43pm, stefanhes wrote:
Thank you Stefan!!

I made a logfile.

I saw the problem!!

It was the old MS_DOS not liking spaces in the path name...


Yes, CHR$(34) is getting mandatory these days, you can not access most files without two of them wink
« Last Edit: Nov 3rd, 2009, 12:46am by Stefan Pendl » User IP Logged

Stefan

Make sure to read and follow the Forum Guidelines

Liberty BASIC Pro 4.04, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
BlueDwarf
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 7
xx Re: Send email, with optional attachments.
« Reply #11 on: Jul 16th, 2010, 2:07pm »

Wow this SendEmail program really rocks! Tested it out on my Virgin Mail account and it works like a dream; attachments no problem! smiley
User IP Logged

andy1977
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 22
xx Re: Send email, with optional attachments.
« Reply #12 on: Feb 21st, 2013, 5:06pm »

Really hoping somebody can help. I have tried this code, with the 2 files, but all I can get is "runtime error: out of memory:" The .Bas file is saved in the same folder as the files.

On a sidenote, trying to find out what why it wasn't working, I managed to associate .PL files to notepad, but downloaded Perl to associate with instead.

Many thanks in advance, Andrew
User IP Logged

Brandon Parker
Board Moderator

member is offline

Avatar




PM

Gender: Male
Posts: 1118
xx Re: Send email, with optional attachments.
« Reply #13 on: Feb 21st, 2013, 9:32pm »

Andrew,

Welcome to the forum!!

Without posting the code that you are using we can only guess as to what may be happening. Please post the code you use and someone will definitely help you out.

{:0)

Brandon
« Last Edit: Feb 21st, 2013, 9:33pm by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
andy1977
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 22
xx Re: Send email, with optional attachments.
« Reply #14 on: Feb 22nd, 2013, 02:03am »

Hi, thank you. It is the same code as above, with me own e-mail details:

Code:
'Example to send email using gmail.
'For other services, see their documentation

'requires sendemail.exe and sendemail.pl

from$ = "andrewraab@btinternet.com"
mailuser$ ="andrewraab@btinternet.com"
recipient$ ="jemmaraab@btinternet.com"
server$ = "mail.btinternet.com:25"           '465 of 587
mailpwd$ = "*********"
subject$ = "howdy"
message$ = "test 123"


cmd$ = " -f ";from$;" -t ";recipient$;" -s ";server$;" -xu ";mailuser$;" -xp ";mailpwd$;" -u ";message$;" -a "

run "C:\Users\Andrew\Desktop\sendEmail\sendEmail.exe ";cmd$, Hide

end
 
« Last Edit: Feb 24th, 2013, 09:41am by Stefan Pendl » User IP Logged

Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5560
xx Re: Send email, with optional attachments.
« Reply #15 on: Feb 22nd, 2013, 03:34am »

Try dropping the -a since you don't specify an attachment.

Code:
cmd$ = " -f ";from$;" -t ";recipient$;" -s ";server$;" -xu ";mailuser$;" -xp ";mailpwd$;" -u ";message$ 


The rest of it looks to be correct.
User IP Logged

andy1977
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 22
xx Re: Send email, with optional attachments.
« Reply #16 on: Feb 22nd, 2013, 3:13pm »

Thanks for the reply. That definitely makes sense, so I have corrected the error.

Code:
'Example to send email using gmail.
'For other services, see their documentation

'requires sendemail.exe and sendemail.pl

from$ = "andrewraab@btinternet.com"
mailuser$ ="andrewraab@btinternet.com"
recipient$ ="jemmaraab@btinternet.com"
server$ = "mail.btinternet.com:25"           '465 of 587
mailpwd$ = "**********"
subject$ = "howdy"
message$ = "test 123"


cmd$ = " -f ";from$;" -t ";recipient$;" -s ";server$;" -xu ";mailuser$;" -xp ";mailpwd$;" -u ";message$

run "C:\sendEmail\sendEmail.exe ";cmd$ , Hide

end 


Unfortunately I am still getting the error, "Runtime error: Out of memory". Below is the error log, If you don't mind, and have the time to have a look. Thanks (I didn't put in the smiley faces lol)
Code:
Error log timestamp Friday 22/02/13 20:50:20

Runtime error: out of memory

Error(Exception)>>defaultAction
Error(Exception)>>activateHandler: <anUndefinedObject> 
Error(Exception)>>handle
Error(Exception)>>signal
Error class(Exception class)>>signal: <'out of memory'> 
BasicProgram(Object)>>error: <'out of memory'> 
BasicProgram>>terminateRun: <anError> 
[] in BasicProgram>>errorHandlerBlock
ExceptionHandler>>evaluateResponseBlock: <aBlockClosure> for: <anError> 
[] in ExceptionHandler>>handle:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure> 
BlockClosure>>invisibleEnsure: <aBlockClosure> 
ExceptionHandler>>handle: <anError> 
ExceptionHandler>>findHandler: <anError> 
Error(Exception)>>activateHandler: <anExceptionHandler> 
Error(Exception)>>handle
Error(Exception)>>signal
Error class(Exception class)>>signal: <'out of memory'> 
BasicProgram(Object)>>error: <'out of memory'> 
[] in RunCommand>>using:
[] in BasicProgram>>begin
ExceptionHandler>>evaluateProtectedBlock: <aBlockClosure> 
[] in ExceptionHandler>>activateDuring:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure> 
BlockClosure>>invisibleEnsure: <aBlockClosure> 
ExceptionHandler>>activateDuring: <aBlockClosure> 
ExceptionHandler class>>handle: <anError class> with: <aBlockClosure> during: <aBlockClosure> 
BlockClosure>>on: <anError class> do: <aBlockClosure> 
BasicProgram>>begin
BasicProgram>>run
[] in BasicSourcePane>>run
BasicCompiler class>>compileFromString: <'
''Example to send e...'> notify: <aBasicSourcePane> ifSuccess: <aBlockClosure> 
BasicSourcePane>>run
BasicSourceWindow>>run
BasicEditorModel>>run: <aToolbarButton> 
BasicEditorModel(Object)>>perform: <#run:> with: <aToolbarButton> 
ToolbarButton>>triggerClickedEvent
Message>>perform
NotificationManager>>runPendingEvents
NotificationManager>>runEventLoop
Message>>perform
Message>>evaluate
Process>>safelyEvaluate: <aMessage> 
Process>>evaluate: <aMessage> 
 

« Last Edit: Feb 24th, 2013, 09:43am by Stefan Pendl » User IP Logged

Mattestion
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 154
xx Re: Send email, with optional attachments.
« Reply #17 on: Feb 22nd, 2013, 3:39pm »

Nothing in the code you supplied should be giving an out of memory error. It could be something other than LB causing the problem. Have you tried restarting your computer? This will clear the memory and perhaps resolve the problem.
User IP Logged

Just BASIC v1.01 / Liberty BASIC Pro v4.04 / Run BASIC v1.01 / Windows 10 - AMD A10-6700T APU - Radeon HD 8650D - 2.50GHz - 8GB RAM
andy1977
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 22
xx Re: Send email, with optional attachments.
« Reply #18 on: Feb 22nd, 2013, 5:08pm »

Getting closer, I think I may have downloaded the wrong sendemail files. I got them from this site: http://caspian.dotconf.net/menu/Software/SendEmail/

and was downloading the 'official' files. Just noticed the files for windows, with TLS Support, downloaded, and now, no more errors. Still struggling to get anything sent through though. Earlier in this thread, someone was successful in sending from a Gmail account, so have now changed my 'from e-mail address', to a gmail.
and got the smtp details from here:
http://www.emailaddressmanager.com/tips/mail-settings.html

Code:
 from$ = "andrewstuartraab@gmail.com"
mailuser$ ="andrewstuartraab@gmail.com"
recipient$ ="andrewraab@btinternet.com"
server$ = "smtp.gmail.com:587"           '465 of 587
mailpwd$ = "*******"
subject$ = "howdy"
message$ = "test 123"


cmd$ = " -f ";from$;" -t ";recipient$;" -s ";server$;" -xu ";mailuser$;" -xp ";mailpwd$;" -u ";message$

run "C:\sendEmail\sendEmail.exe ";cmd$ , Hide

end
 


I would like to say a big thank you, to everyone that is taking the time and effort to reply. I do really appreciate it.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls