I got the code for sending e-mail from here, which is this:
SeptimusHeap wrote:
| message sender recipients |
message := 'From: Me <my.address@example.invalid>
To: You <your.address@another.invalid>
Subject: Simple Mail from Squeak
This is a test mail'.
sender := 'my.address@example.invalid'.
recipients := #('your.address@another.invalid').
SMTPClient
deliverMailFrom: sender
to: recipients
text: message
usingServer: 'name.of.mail.server'
If i changed it to
sendEmailFrom: t1 to: t2 subject: t3 body: t4 server: t5
| message sender recipients |
message := 'From: t1
To: t2
Subject: t3
t4'.
sender := t1
recipients := #(t2).
SMTPClient
deliverMailFrom: sender
to: recipients
text: message
usingServer: t4, could i make a e-mail block?
Last edited by celloguy123 (2010-08-21 14:51:46)
Offline
sendEmailFrom: t1 to: t2 subject: t3 body: t4 server: t5
| message sender recipients |
message := 'From: t1
To: t2
Subject: t3
t4'.
sender := t1
recipients Error: when I try to save it, it says right here, "Nothing more expected ->.":= #(t2).
SMTPClient
deliverMailFrom: sender
to: recipients
text: message
usingServer: t4
Last edited by celloguy123 (2010-09-01 12:54:34)
Offline
squeak wiki wrote:
However, finding the name of the mail server is difficult. You need to look up an MX (Mail eXchange) record for the recipient domain with th DNS system, and Squeak does not provide an interface to that (which really is a pity).
That's the main reason why Squeak is wimping out and only delivers to a server address that you provide.
The other reason is that in theses days of spam and worms and viruses, many incoming mail servers don't accept mail from dynamic IP addresses anymore, so even if you find the MX for a given mail address, chances are good that it won't accept mail from you.
Does that help?
Offline
celloguy123 wrote:
sendEmailFrom: t1 to: t2 subject: t3 body: t4 server: t5
| message sender recipients |
message := 'From: t1
To: t2
Subject: t3
t4'.
sender := t1
recipients := #(t2).
SMTPClient
deliverMailFrom: sender
to: recipients
text: message
usingServer: t4
Offline
didn't work. gave no errors, but the something could not be found. cant remeber what maybe server, recipient or client
probably yahoo doesnt accept them anymore
Offline
^^i did< it4s the sq;e qccount i use for outlook
Offline
I know VBS can send email, so maybe you could make an email block that asks for subject, who to, and what the message is. Then it writes it to a VBS file and runs it. That should send an email?? Does that help? I might try that now.
Offline