How do I get a MX Server name ...

Everything else that doesn't fall into one of the other PB categories.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

no it dosent come with my pop3. It returns an adress i dont know.
I have tried to connect to it with raw tcp but it dosent connect like it should.
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Very much ISP's block port 25 to the outside world.
I have to use the SMTP server from my provider, there is no way i can connect to another SMTP server...

Get the SMTP server from outlook in the registry, or let users input it...that's the only way...
hm
User
User
Posts: 30
Joined: Mon Oct 27, 2003 12:15 pm
Location: Germany
Contact:

Post by hm »

would a solution perhaps be the implementation of a smtp-server in purebasic? so you wouldn't have to use a smtp-server on the net but use the local smtp-server of your program on the customers machine.

perhaps there is some worm's source code around where you can rip off and convert to pure the 'send mail' part.
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

try checking the registry for this path.. inside there's a key with the name "SMTP Server".. just use that value.. shouldn't be too hard..

note: this works only if the user has installed Outlook (Office)

Code: Select all

HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001
Other mailclient users (like Outlook Express, Eudora etc.) should post where their account info is, so we can gather a little "database" of where the info lies... :)

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I've delt with this issue already with Kapital - the only solution I found was to ask users to enter the SMTP server address. MANY ISPs (especially in the US) are blocking outgoing SMTP connections to anything but their SMTP servers in a (futile) effort to prevent SPAM.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
hm
User
User
Posts: 30
Joined: Mon Oct 27, 2003 12:15 pm
Location: Germany
Contact:

Post by hm »

i think implementing a "smtp-server in purebasic" would be a big task. but it would circumvent the ISP's blocking of SMTP ports since it communicates directly to the pop3 server. am i wrong?
on the other hand i don't know if ISP's are also blocking ports for communication between pop3 and smtp servers on dial-in style connections.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

it all depends on the isp, in general:

- pop3 only for incoming mail

- smtp only for outgoing mail

- most isp's block smtp traffic from OUTSIDE their network, they often don't filter smtp traffic crossing network boundaries, but the receiving isp may not accept it

if you have your own smtp server on a private ip most other smtp clients can deliver mail to you

pop3 is rarely used for outgoing mail (although i think it can, or might be able to depending on version / implementation, i could be wrong here)

so, for smtp: either scan for it in the registry (what is te user using now) or ask him / her to type it in, or have your own smtp server up and running and hope that the isp did not block it...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

SMTP is the only mail delivery protocol used today (well, I guess you can still find a UUCP server around too)..

POP3 has nothing to do with the delivery of mai as it is a protocol designed for getting mail from your mail server (as opposed to getting it into the mail server!)...
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
hm
User
User
Posts: 30
Joined: Mon Oct 27, 2003 12:15 pm
Location: Germany
Contact:

Post by hm »

ah i think i'm getting it. i send my outgoing mail to the smtp server of my mail service provider. the smtp server of my provider sends the mail to the smtp server of the recipient's provider. if this is true, then the sending smtp server still would have to get the recipients smtp server - same problem.

???
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

glad i said 'i could be wrong here' :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

couldn't you just use something like....

Code: Select all

;Sendmail using shell execute example
;Mailto:ash@satanicdreams.com

 em_subject$= "This is the subject line"
 em_body$= "Message body text goes here"

 em_mail$= "mailto:Me@MyEmailAddress.com?subject=" + em_subject$ +"&body="+ em_body$

If ShellExecute_(Handle,"open",em_mail$, nil, nil, SW_SHOWNORMAL)
  MessageRequester("Executed ok", "Loading default mail client")
EndIf
End
This way, the forms data is sent to the default mail client? saves pissing around anyway. and at least this way you will know who it is from too :)

Late edit... you could use MAPI (Messaging Application Programming Interface - See MSDN) I suppose too, but don't ask me for an example for that :) well not yet anyway.
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

hm wrote:if this is true, then the sending smtp server still would have to get the recipients smtp server - same problem.
Have you read the RFCs for smtp and domain lookups? They describe the mechanisms of how it all works.
Doing an MX lookup requires querying a domain name server, (sometimes several servers!) and from what I remember it uses UDP :evil:
CherokeeStalker
User
User
Posts: 66
Joined: Fri Oct 17, 2003 2:42 am

RE: Many ISP's Block outbound SMTP

Post by CherokeeStalker »

Doesn't matter... Cox blocks SMTP (Port 25). One way to get around this is to use a service such as SoftHome.net offers. Both a FREE & a PAY version. They simply accept INBOUND SMTP from there subscribers on one or more alternate ports and send the OUTBOUND on the standard port! Besides, most providers will UNBLOCK this if you have a commercial account & request they do so. Not to mention quite a few other ways around that problem. Sorry if I strayed a little off topic here!

Cherokee~Stalker
Worm
User
User
Posts: 20
Joined: Wed Apr 14, 2004 2:32 am
Location: Grand Rapids, MI
Contact:

Post by Worm »

Use a Web Gadget, submit the message to a PHP script off your website.

It's worked for me :D
Post Reply