[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Jmail Login

Posted on 2004-04-23
8
Medium Priority
?
2,335 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 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