Easiest way to send mail

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
jhoski
Member
Posts: 11
Joined: Sun Jan 03, 2010 5:00 pm

Easiest way to send mail

Post by jhoski »

What is the easiest and best mail service to use with the SMTP device. I notice it has no way to change ports, use SSL, etc. so I don't imagine it works with very many services. What are folks using?
Thanks, Jay
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: Easiest way to send mail

Post by Osler »

Try the ostrosoft component and add an email account to your current ISP.

Code: Select all

Option Explicit 

Dim oSMTP 'As OSSMTP.SMTPSession 

Set oSMTP = CreateObject("OSSMTP.SMTPSession") 

oSMTP.Server = "smtp-server.myISP.com" 'SMTP server name or IP address
oSMTP.POPServer = "pop-server.myISP.com" 
oSMTP.Port = 25 
oSMTP.MailFrom = "HouseBot [email protected]" 'sender e-mail address 
oSMTP.SendTo = "[email protected]" 'recipient e-mail address 
oSMTP.AuthenticationType = 1 '0 = AuthNone, 1 = AuthPOP, 2 = AuthLogin, 3 = AuthPlain 
oSMTP.Username = "HouseBot Server" 'name for mailserver authentication 
oSMTP.Password= "mypwd" 'password for mailserver authentication 
oSMTP.MessageSubject = "mySubject" 'message subject or use GetPropertyValue(".MySubject") to retrieve a property from HB 
oSMTP.MessageText = GetPropertyValue("myDevice.myProperty") 'message text or use GetPropertyValue(".MyText") to retrieve a property from HB 
oSMTP.RaiseError = True 

oSMTP.SendEmail 

Set oSMTP = Nothing
Osler
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Easiest way to send mail

Post by Richard Naninck »

any way to send an attachment as well using ostrosoft?
I use OSPOP3 for receiving emails but use a different form for sending emails. HouseBot can't send attachments so I had to look for another way to send a doorbell picture to my iPhone.
jhoski
Member
Posts: 11
Joined: Sun Jan 03, 2010 5:00 pm

Re: Easiest way to send mail

Post by jhoski »

Looks like there is a newer version of this software called OSSMTP_Plus that handles SSL, attachments, and some other stuff.

I have not had any luck with the SSL stuff using my normal gmail accounts or the yahoo plus accounts that need SSL.
I did get it to work with the old yahoo smtp servers on port 25.
I guess thats what I'll use for now.
edgar
Member
Posts: 95
Joined: Tue Mar 24, 2009 11:14 pm
Location: Springfield, VA

Re: Easiest way to send mail

Post by edgar »

I use a command line program called POSTIE.

The free version has some limitations but works well. I have been using it for years.

http://www.infradig.com/postie/

v.r

Kevin
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Easiest way to send mail

Post by Richard Naninck »

I use this:

Code: Select all

Dim iMsg
Dim iConf
Dim Flds

Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort   = 2
Const cdoSMTPServer      = "http://schemas.microsoft.com/cdo/configuration/smtpserver"

	Set iMsg    = CreateObject("CDO.Message")
	Set iConf   = CreateObject("CDO.Configuration")
	Set Flds    = iConf.Fields
	
	With Flds
		.Item(cdoSendUsingMethod) = cdoSendUsingPort
		.Item(cdoSMTPServer)      = GetPropertyValue("EMail.Account0 Server")
		.Update
	End With
	
'------------- Do your thing here...

	With iMsg
    	    Set .Configuration = iConf
		.To            = GetPropertyValue("EMail.Account0 User")
		.From          = GetPropertyValue("EMail.Account0 User")
		.Subject       = "Deurbel"
		.TextBody      = ""
		.AddAttachment Image
		.Send
	End With
		
	Set Flds    = Nothing
	Set iConf   = Nothing
	Set iMsg    = Nothing
Post Reply