--nextPart5753466.k0TFDkDMZQ
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Quoth Mohit Sindhwani on Thursday 13 September 2007 09:49:49 pm:
> Michael Linfield wrote:
> > Ive tried several examples from numerous books trying to send mail with
> > net smtp and i never really get the emails.
> >
> > require 'net/smtp'
> >
> > message =3D <<MESSAGE_END
> > From: Nobody <nobody@power.net>
> > To: Someone <someone@hotmail.com>
> > Subject: Test SMTP
> >
> > i pray that itll work
> > MESSAGE_END
> >
> > Net::SMTP.start('mx1.hotmail.com') do |smtp|
> > smtp.send_message message, 'nobody@power.net', 'someone@hotmail.com'
> > end
> >
> > #####
> > This was one example, i receive no errors indicating a problem but when
> > checking my email IE: someone@hotmail.com i dont have it in any
> > folders, not inbox or junkmail.
> >
> > Another version that i modified to fit my own needs was this ----
> >
> > require 'net/smtp'
> >
> > puts "Sender: "
> > sender =3D gets.chomp
> > puts "Recipient: "
> > rcpt =3D gets.chomp
> > puts "Message: "
> > msg =3D gets.chomp
> >
> > smtp =3D Net::SMTP.new('mx1.hotmail.com')
> >
> > smtp.start()
> >
> > smtp.ready(sender, rcpt) do |mail|
> >
> > mail.write msg
> >
> > end
> >
> > #########
> > once again no errors
> >
> > any ideas why i might not be getting the emails?
> > =20
>=20
> I know I'm not directly answering your question, but there's a sample on=
=20
> my blog:
> http://notepad.onghu.com/ruby
>=20
> I think it would be good for you to try to send it to some other email=20
> address, perhaps, you are missing some fields which make your mail look=20
> like spam and is being dropped by something along the way?
>=20
> Cheers,
> Mohit.
> 9/14/2007 | 12:49 PM.
A lot of ISPs block people from having mail servers on their local machines,
as this is something zombie networks tend to do rather than joe idiot user.
=2D-=20
Konrad Meyer <konrad@tylerc.org>
http://konrad.sobertillnoon.com/
--nextPart5753466.k0TFDkDMZQ
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQBG6hSoCHB0oCiR2cwRAiM2AKCGo7+bRkxa0lZU7bpdl3 LNd5d/EgCgv7Sk
lDSFkyGj57wm++FDV1U7iu0=
=9OFZ
-----END PGP SIGNATURE-----
--nextPart5753466.k0TFDkDMZQ--