Sending email with Run BASIC

new BookmarkLockedFalling
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

votan
Senior Member
****

votan Avatar

Posts: 304

Post by votan on Jul 13, 2008 18:48:05 GMT -5

Now that we have such a nice smtp mailer, it would be cool if RB would allow encoding to BASE64, to allow file attachments without the need of using any external program. Cause then it could be done on the fly, without first writing the file to the disc, converting it, writing it again, reading it again and then finally appending it the right way to the email.... Would require buffering though...
Last Edit: Jul 13, 2008 18:50:13 GMT -5 by votan
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

Post by Carl Gundel - admin on Jul 13, 2008 18:53:28 GMT -5

votan Avatar
Now that we have such a nice smtp mailer, it would be cool if RB would allow encoding to BASE64, to allow file attachments without the need of using any external program. Cause then it could be done on the fly, without first writing the file to the disc, converting it, writing it again, reading it again and then finally appending it the right way to the email.... Would require buffering though...

Yes, this is a natural next step.

-Carl
votan
Senior Member
****

votan Avatar

Posts: 304

Last Edit: Jul 18, 2008 6:03:17 GMT -5 by votan
votan
Senior Member
****

votan Avatar

Posts: 304

Post by votan on Jul 23, 2008 8:05:14 GMT -5

Hmmmm.... am just experimenting with the smtp sender and found something missing for real world usage. It would be cool to also be able to define the senders "real name" to the smtp function, as not sending the realname along in an email header causes most emailservers to flag this email as spam.
carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

Post by carlgundel on Jul 24, 2008 9:10:13 GMT -5

votan Avatar
Hmmmm.... am just experimenting with the smtp sender and found something missing for real world usage. It would be cool to also be able to define the senders "real name" to the smtp function, as not sending the realname along in an email header causes most emailservers to flag this email as spam.

The SMTP sender object is a little thin right now, I agree. We will flesh it out in time. I will try to add the realname for the next release.

-Carl
votan
Senior Member
****

votan Avatar

Posts: 304

Post by votan on Oct 28, 2008 14:25:07 GMT -5

How are things going with adding the realname feature to the SMTP handler?? ... and adding a pop3 handler??
Already solved the base64 issue..... So no need to add this natively to RB. The shell function and some base64 command line tool works just fine! :)
Just the realname thing to avoid spamfiltering and pop3 support would be perfect for the next release.
Last Edit: Oct 28, 2008 14:48:39 GMT -5 by votan
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

Post by Carl Gundel - admin on Oct 28, 2008 19:56:51 GMT -5

votan Avatar
How are things going with adding the realname feature to the SMTP handler??

This should be no problem.
... and adding a pop3 handler??

No promises on this for the next release. I'm sure it'll come, but not right away.
Already solved the base64 issue..... So no need to add this natively to RB. The shell function and some base64 command line tool works just fine! :)
Just the realname thing to avoid spamfiltering and pop3 support would be perfect for the next release.

Maybe there is an external tool you can use to read POP3 mail in the meanwhile?

-Carl
votan
Senior Member
****

votan Avatar

Posts: 304

JackWebb
Junior Member
**

JackWebb Avatar

Posts: 69

Post by JackWebb on Dec 22, 2008 10:17:10 GMT -5

carlgundel Avatar
Scott and I have added an email sending object to Run BASIC called smtpsender. Here is a quick example of how you would use it to send an email message:

mailServer$ = "mail.myserver.com"
pword$ = "donuts321"
fromAddr$ = "carlg@libertybasic.com"
toAddr$ = "user@gmail.com"
subject$ = "Do you want some Pi?"
text$ = "Yes please. With vanilla ice cream!"

smtpsender #aSender, mailServer$
#aSender password(pword$)
#aSender send(fromAddr,ドル toAddr,ドル subject,ドル text$)



This is very cool indeed.. I've been playing around with it with no luck at all.. What piece of the puzzle am I missing? Do I also need to be running a mail server? Is anyone hosting from home able to use this feature, or is this strictly for hosted sites? I'm only looking to send email from a form. As in refer a friend type form..
Last Edit: Dec 22, 2008 10:23:32 GMT -5 by JackWebb
Live to code, code to live!
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

Post by Carl Gundel - admin on Dec 22, 2008 11:17:29 GMT -5

JackWebb Avatar
carlgundel Avatar
Scott and I have added an email sending object to Run BASIC called smtpsender. Here is a quick example of how you would use it to send an email message:

mailServer$ = "mail.myserver.com"
pword$ = "donuts321"
fromAddr$ = "carlg@libertybasic.com"
toAddr$ = "user@gmail.com"
subject$ = "Do you want some Pi?"
text$ = "Yes please. With vanilla ice cream!"

smtpsender #aSender, mailServer$
#aSender password(pword$)
#aSender send(fromAddr,ドル toAddr,ドル subject,ドル text$)



This is very cool indeed.. I've been playing around with it with no luck at all.. What piece of the puzzle am I missing? Do I also need to be running a mail server? Is anyone hosting from home able to use this feature, or is this strictly for hosted sites? I'm only looking to send email from a form. As in refer a friend type form..

You need to have an SMTP mail server to point Run BASIC at. You don't have to run the server on your own hardware (I don't).

-Carl
JackWebb
Junior Member
**

JackWebb Avatar

Posts: 69

Post by JackWebb on Dec 22, 2008 11:28:53 GMT -5

Carl Gundel - admin Avatar
JackWebb Avatar


This is very cool indeed.. I've been playing around with it with no luck at all.. What piece of the puzzle am I missing? Do I also need to be running a mail server? Is anyone hosting from home able to use this feature, or is this strictly for hosted sites? I'm only looking to send email from a form. As in refer a friend type form..

You need to have an SMTP mail server to point Run BASIC at. You don't have to run the server on your own hardware (I don't).

-Carl


You mean like like google, yahoo or aol? Not sure about the last 2 but I read somewhere that you can use google for this. But google at least requires authentication and a port number, how would I pass those? Doesn't look like I can right now, maybe some future version.. Are you using some other service? Could you post a code snip with your passwords removed of course :)

Thanks Carl!
Last Edit: Dec 22, 2008 11:30:18 GMT -5 by JackWebb
Live to code, code to live!
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

Post by StefanPendl on Dec 22, 2008 13:06:59 GMT -5

JackWebb Avatar

You mean like like google, yahoo or aol? Not sure about the last 2 but I read somewhere that you can use google for this. But google at least requires authentication and a port number, how would I pass those?

You can use your account information of your ISP, there is no need to use any free mail accounts.
[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
JackWebb
Junior Member
**

JackWebb Avatar

Posts: 69

Post by JackWebb on Dec 22, 2008 21:23:01 GMT -5

StefanPendl Avatar
JackWebb Avatar

You mean like like google, yahoo or aol? Not sure about the last 2 but I read somewhere that you can use google for this. But google at least requires authentication and a port number, how would I pass those?

You can use your account information of your ISP, there is no need to use any free mail accounts.


Thanks Stefan, that did the trick. I've been using the same ISP for 5 years and never signed up for their email services until today. My form works perfectly now and was super easy to code. I was avoiding using my ISP info in my RB code because I'd like to switch my ISP in march, and for privacy reasons as well. I'd still like to use Google or AOL for this however. Maybe when I have closer a look at the SendEmail program that Votan posted in another thread I might still be able to do that..

Thanx!
Last Edit: Dec 22, 2008 21:32:57 GMT -5 by JackWebb
Live to code, code to live!