?
Solved

Jmail Login

Posted on 2004-04-23
8
Medium Priority
?
2,267 Views
Last Modified: 2012-05-04
Hello all,

I am using JMail to send emails.  I need to change the configuration to send the email from a different server.  I have the details of the server, but I dont know the syntax to state the login and password.

This is my existing code:

loMail = CREATEOBJECT("jmail.smtpmail")
loMail.serveraddress = <serveraddress>
loMail.sender = <senderaddress>
loMail.addRecipient("test@test.com")
loMail.subject = "This is a test"
loMail.Body = "This is a test"
loMail.Silent=.T.
lbRetVal = loMail.execute()
RELEASE loMail

I assume it would be something like:
loMail.ServerUserName = <username>
loMail.ServerPassword = <password>

But this does not work...

Please can anyone let me know the correct syntax for this.

Thanks
0
Comment
Question by:charlotte1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 10900146
I dont think you need to use username and password, you should just have to allow relaying on the smpt server for the IP address your mail is coming from and you should be fine...
0
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 10900190
If you do need to use the username and password you can try this though:
loMail.MailServerUserName = "SomeUserName"
loMail.MailServerPassWord = "SomePassword"
0
 

Author Comment

by:charlotte1
ID: 10900289
I have tried this, but I get the error message "Unknown Member".

Unfortunately I do need to use a login and password as the mail server is not on our network, but it is an internet service.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 11

Expert Comment

by:Slimshaneey
ID: 10900314
I think the login details are only available on the pro version, ie the one you pay for. Looks like you will have to open relays on the smtp server for your web server ip or fork out the cash for the object.
0
 

Author Comment

by:charlotte1
ID: 10900325
Please can you explain how I would do this.

Thanks
0
 

Author Comment

by:charlotte1
ID: 10900348
I mean, how I would open relays on the SMTP Server for our web server IP
0
 
LVL 11

Accepted Solution

by:
Slimshaneey earned 1000 total points
ID: 10900388
In IIS, right click on your SMTP node, click properties. Go to the Access tab, and at the bottom click the Relay... Button. A pop up will appear, enter the ip address of your web server in the first box and bob's your uncle, you can send emails again...
0
 
LVL 31

Expert Comment

by:alorentz
ID: 10900511
Why don't you just use CDOSYS instead of JMail, it's free and comes with Windows, and you can relay it off any SMTP servers that allow it.

CDO runs on Windows 2003, CDONTs does not.


Code below works, I use it: uses port 25, no configuration. Had problem with configuration on local machine.

strTo = "toemail@yourdomain.com"    'Make sure the From field has no spaces.
strFrom = "fromemail@yourdomain.com"
strSubject = "Your Subject"
strBody = "The content of email"


' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDO.Message")
   
' Set the properties of the object
objCDOMail.Sender = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.TextBody = strBody


' Some of the more useful ones I've included samples of here:
'objCDOMail.Cc = "mailto:sschofield@aspfree.com;steve@aspfree.com"   Notice this sending to more than one person!
'objCDOMail.Bcc = "sschofield@aspfree.com;steve@aspfree.com"
'objCDOMail.Importance = 1

'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt"

' Send the message!
objCDOMail.Send

' Set the object to nothing because it immediately becomes
' invalid after calling the Send method + it clears it out of the Server's Memory.
Set objCDOMail = Nothing
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question