orufet 12-18-2001, 04:38 PM What type of control is Ms? And what about Mm? Have you declared any constants? Are you even calling this sub?
I have no idea judging by the information you gave us, but the error message sounds like you are trying to set the value of a constant.
lmb2001 12-18-2001, 04:41 PM This codeis supposed to email a simple message but I get an error "Assignment to constant not permitted.."
what is wrong with it?
sub cmdSend
frmMain.Ms.SignOn
frmMain.Mm.SessionID = frmMain.Mm.SessionID
frmMain.Mm.Compose
frmMain.Mm.RecipAddress = Me.txtTo
frmMain.Mm.MsgSubject = Me.txtSubject
frmMain.Mm.MsgNoteText = Me.txtMessage
frmMain.Mm.Show
frmMain.Mm.Send = False
frmMain.Ms.SignOff
end sub
orufet 12-18-2001, 04:42 PM The .Send method cannot be set to false. Just use MM.Send.
lmb2001 12-18-2001, 04:45 PM mm=mapimessage1
ms=mapisession
no declared constants
Banjo 12-18-2001, 04:49 PM The only thing I can see that might cause that message is the frmMain.mm.Send = False statement. That appears to be the only constant in the posted code. you might want to double check the usage of .Send
lmb2001 12-18-2001, 04:56 PM thats what the tut siad 2 do
Banjo 12-18-2001, 05:02 PM What you is:
.Send false
It's a function parameter, not a property assignment.
lmb2001 12-18-2001, 05:05 PM thanks every one!
lmb2001 12-18-2001, 05:09 PM I changed it so that it looks like this and i get a
"MAPI Failure: Valid SessionID does not exist" type error
Private Sub cmdSend_Click()
frmMain.Ms.SignOn
frmMain.Mm.SessionID = frmMain.Mm.SessionID
frmMain.Mm.Compose
frmMain.Mm.RecipAddress = Me.txtTo
frmMain.Mm.MsgSubject = Me.txtSubject
frmMain.Mm.MsgNoteText = Me.txtMessage
frmmain.mm.Send
frmMain.Mm.Show
frmMain.Ms.SignOff
End Sub
and then when i choose to debug visual basic highlights the line:
"frmMain.Mm.Compose"
what is going on?
Banjo 12-18-2001, 05:12 PM do this:
frmMain.Mm.SessionID = frmMain.Ms.SessionID
Also I'd recommend using With frmMain. It'll save you typing it every time.
lmb2001 12-18-2001, 05:13 PM THANK YOU ..that was it..lol
hahahahah
thanks BUD!
orufet 12-18-2001, 05:15 PM There is a tutorial in the Tutor's Corner about using Winsock and Telnet to send e-mail. That's how I do it; it's a lot more fun that way, and less dependent on the machine you're using.
lmb2001 12-18-2001, 05:19 PM Is there a way that I can make it so that I cannot see MS Outlook Express sending the message?(its to time consuming)
Is there a way to NOT use MS Outlook?(My outlook is sort of messed up)
Banjo 12-18-2001, 05:28 PM If there is then it will be in the mail application that the MAPI control is using. Have a browse through the Outlook settings.
lmb2001 12-18-2001, 05:31 PM I'll try..thank you
Is there any other methods of retrieving/send email without using any external programs??
Banjo 12-18-2001, 05:33 PM Look at Orufet's post. He suggested looking at the Tutorial on using winsock to do email.
reboot 12-18-2001, 05:34 PM Yes, winsock and SMTP.
The most generic way.
lmb2001 12-18-2001, 05:46 PM where can I find out howto do this?
orufet 12-18-2001, 05:50 PM <blockquote><font class="small">In reply to:</font><hr>
There is a tutorial in the Tutor's Corner about using Winsock and Telnet to send e-mail. That's how I do it; it's a lot more fun that way, and less dependent on the machine you're using.
<hr></blockquote>
Please read the posts before you ask a question that I already answered...
reboot 12-18-2001, 06:01 PM You can start by reading the various smtp rfc's. 876 is the first one I believe.
ftp://nic.merit.edu/documents/rfc/
divil 12-19-2001, 05:53 AM Sending email by SMTP via Winsock is probably a little out of lmb2001's depth though. I'd stick to using Outlook with MAPI if I were you.
reboot 12-19-2001, 11:13 AM You're assuming that same attitude I complain about here... how will he know it's out of his depth if he doesn't even try?
ChiefRedBull 12-19-2001, 03:22 PM So many ppl miss my little tutorial.. argh! ***... Email is easy.... use SMTP, its all there for you... please..... love me...... ***...
reboot 12-19-2001, 03:38 PM I certainly agree, SMTP is SO easy. If you use the winsock control (not that I recommend that, but winsock is harder to learn than SMTP) even a semi-inexperienced programmer can whip up an email sender in just a little while.
lmb2001 12-25-2001, 12:37 PM Is the hotmail SMTP the same as Yahoo SMTP?
Im having no luck with the winsock control (tryng to imitate SMTP ) what about SocketWrentch?
Derek Stone 12-25-2001, 01:01 PM SMTP is SMTP is SMTP.
Yahoo! uses regular ole' SMTP to send email just like the majority of other email services out there.
Good Luck
-cl
ChiefRedBull 12-25-2001, 02:54 PM Theres a working example of using winsock to send mail through HotMails SMTP in the Code Lib. Check there...
|